Migrate to ESLint 9
Same as https://github.com/FreshRSS/FreshRSS/pull/6685
This commit is contained in:
parent
31bbdb55be
commit
4dfe8efa39
5 changed files with 1080 additions and 518 deletions
58
eslint.config.js
Normal file
58
eslint.config.js
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import globals from "globals";
|
||||
import js from "@eslint/js";
|
||||
import neostandard from 'neostandard';
|
||||
import stylistic from '@stylistic/eslint-plugin';
|
||||
|
||||
export default [
|
||||
{
|
||||
files: ["**/*.js"],
|
||||
languageOptions: {
|
||||
globals: globals.browser,
|
||||
sourceType: "script",
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: [
|
||||
".git/",
|
||||
"**/*.min.js",
|
||||
"extensions/",
|
||||
"node_modules/",
|
||||
"p/scripts/vendor/",
|
||||
"vendor/",
|
||||
// Additional exclusions for Extensions:
|
||||
"symbolic/",
|
||||
"third-party/",
|
||||
"tmp/",
|
||||
],
|
||||
},
|
||||
js.configs.recommended,
|
||||
// stylistic.configs['recommended-flat'],
|
||||
...neostandard(),
|
||||
{
|
||||
plugins: {
|
||||
"@stylistic": stylistic,
|
||||
},
|
||||
rules: {
|
||||
"camelcase": "off",
|
||||
"eqeqeq": "off",
|
||||
"no-empty": ["error", { "allowEmptyCatch": true }],
|
||||
"no-unused-vars": ["error", {
|
||||
"args": "none",
|
||||
"caughtErrors": "none",
|
||||
}],
|
||||
"yoda": "off",
|
||||
"@stylistic/indent": ["warn", "tab", { "SwitchCase": 1 }],
|
||||
"@stylistic/linebreak-style": ["error", "unix"],
|
||||
"@stylistic/max-len": ["warn", 165],
|
||||
"@stylistic/no-tabs": "off",
|
||||
"@stylistic/quotes": ["off", "single", { "avoidEscape": true }],
|
||||
"@stylistic/quote-props": ["warn", "consistent"],
|
||||
"@stylistic/semi": ["warn", "always"],
|
||||
"@stylistic/space-before-function-paren": ["warn", {
|
||||
"anonymous": "always",
|
||||
"asyncArrow": "always",
|
||||
"named": "never",
|
||||
}],
|
||||
},
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue