forked from 4minitz/4minitz
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(eslint): Update eslint packages and config (#882)
* chore(eslint): Update eslint packages and config
- Loading branch information
1 parent
8dec4e4
commit bb604c1
Showing
5 changed files
with
15,326 additions
and
9,548 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"; | ||
import meteor from "eslint-plugin-meteor"; | ||
import lodash from "eslint-plugin-lodash"; | ||
import noJquery from "eslint-plugin-no-jquery"; | ||
import babel from "@babel/eslint-plugin"; | ||
import promise from "eslint-plugin-promise"; | ||
import deprecate from "eslint-plugin-deprecate"; | ||
import jsdoc from "eslint-plugin-jsdoc"; | ||
import globals from "globals"; | ||
import babelParser from "@babel/eslint-parser"; | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
import js from "@eslint/js"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}); | ||
|
||
|
||
export default [{ | ||
ignores: ["client/4minitz.html"], | ||
}, ...fixupConfigRules(compat.extends( | ||
"eslint:recommended", | ||
"plugin:meteor/recommended", | ||
"plugin:lodash/canonical", | ||
"prettier", | ||
"plugin:node/recommended", | ||
"plugin:you-dont-need-lodash-underscore/compatible", | ||
"plugin:no-jquery/all", | ||
"plugin:promise/recommended", | ||
"plugin:mocha-cleanup/recommended", | ||
"plugin:mocha/recommended", | ||
)), { | ||
plugins: { | ||
meteor: fixupPluginRules(meteor), | ||
lodash: fixupPluginRules(lodash), | ||
"no-jquery": fixupPluginRules(noJquery), | ||
"@babel": babel, | ||
promise: fixupPluginRules(promise), | ||
deprecate, | ||
jsdoc, | ||
'@stylistic', | ||
stylistic: StylisticPlugin | ||
}, | ||
StylisticPlugin.configs['disable-legacy'], | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
}, | ||
|
||
parser: babelParser, | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
|
||
rules: { | ||
"node/no-unsupported-features/es-syntax": "off", | ||
"node/no-missing-import": "off", | ||
"lodash/prefer-lodash-method": "off", | ||
"lodash/prefer-lodash-typecheck": "off", | ||
"lodash/prefer-get": "off", | ||
"lodash/prefer-noop": "off", | ||
"lodash/prefer-constant": "off", | ||
"lodash/preferred-alias": "error", | ||
"@stylistic/new-cap": "error", | ||
"@babel/no-invalid-this": "error", | ||
"@babel/no-unused-expressions": "error", | ||
"@stylistic/object-curly-spacing": ["error", "always"], | ||
"@stylistic/semi": "error", | ||
"prefer-template": "error", | ||
eqeqeq: ["error", "smart"], | ||
"object-shorthand": ["error", "always"], | ||
}, | ||
}]; |
Oops, something went wrong.