Skip to content

Commit

Permalink
Use old config for ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
4yman-0 committed Dec 21, 2024
1 parent bd545c8 commit 4ba6996
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 23 deletions.
45 changes: 29 additions & 16 deletions config/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,35 @@ const customGlobals = {
chrome: "readonly",
}

export default [

js.configs.recommended,
export default [ js.configs.recommended,
{

Check failure on line 11 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 1 tab but found 0
languageOptions: {
globals: {
...customGlobals,
...globals.browser,
},
},
languageOptions: { globals: {

Check failure on line 12 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 2 tabs but found 1
...customGlobals,

Check failure on line 13 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 3 tabs but found 2
...globals.browser,

Check failure on line 14 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 3 tabs but found 2
}},

Check failure on line 15 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 2 tabs but found 1
ignores: ["../node_modules", "."],

Check failure on line 16 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 2 tabs but found 1
rules: {

Check failure on line 17 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 2 tabs but found 1
"no-unused-vars": [
"error",
{ destructuredArrayIgnorePattern: "^_" },
],
indent: ["error", "tab", {"SwitchCase": 1}],

Check failure on line 18 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 3 tabs but found 2
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],

Check failure on line 19 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 3 tabs but found 2
"no-empty": ["error", { "allowEmptyCatch": true }],

Check failure on line 20 in config/eslint.config.js

View workflow job for this annotation

GitHub Actions / lint-and-test

Expected indentation of 3 tabs but found 2
"no-unused-vars": ["error", { "caughtErrors": "none" }],
"no-undef": "off",
"no-trailing-spaces": "warn",
"no-multi-spaces": "warn",
"semi-spacing": "warn",
"comma-spacing": "warn",
"no-fallthrough": ["error", { "allowEmptyCase": true }],
"no-implicit-globals": "error",
"no-multiple-empty-lines": ["warn", {"max": 2, "maxBOF": 0, "maxEOF": 0}],
"keyword-spacing": ["warn", { "before": true, "after": true }],
"space-before-function-paren": "warn",
"space-before-blocks": "warn",
"max-len": ["error", {
code: 255,
ignoreUrls: true,
ignoreStrings: true,
ignoreComments: true,
ignoreRegExpLiterals: true
}]
},
},

];
}];
9 changes: 5 additions & 4 deletions config/prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default {
trailingComma: "es5",
tabWidth: 4,
semi: false,
singleQuote: true,
trailingComma: "es5",
tabWidth: 4,
semi: false,
singleQuote: true,
useTabs: false,
};
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
"devDependencies": {
"@eslint/js": "^9.17.0",
"eslint": "^9.17.0",
"globals": "^15.14.0",
"jest": "^29.7.0",
"jslint": "^0.12.1",
"globals": "^15.14.0",
"prettier": "^3.4.2"
},
"browserslist": [
"last 10 versions, not dead, > 1%",
"not op_mini all"
"last 10 versions, not dead, > 1%"
]
}

0 comments on commit 4ba6996

Please sign in to comment.