Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Migrate ESLint to FlatConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed Jul 31, 2024
1 parent 7777425 commit 6e3b1b9
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 54 deletions.
54 changes: 0 additions & 54 deletions .eslintrc

This file was deleted.

77 changes: 77 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import globals from "globals";

export default [
{
languageOptions: {
globals: {
...globals.browser,
sap: true,
jQuery: true,
},
ecmaVersion: 5,
sourceType: "script",
},

rules: {
"block-scoped-var": 1,

"brace-style": [
2,
"1tbs",
{
allowSingleLine: true,
},
],

"consistent-this": 2,
"no-div-regex": 2,
"no-floating-decimal": 2,
"no-self-compare": 2,
"no-mixed-spaces-and-tabs": [2, true],
"no-nested-ternary": 2,

"no-unused-vars": [
2,
{
vars: "all",
args: "none",
},
],

radix: 2,
"keyword-spacing": 2,
"space-unary-ops": 2,
"wrap-iife": [2, "any"],
camelcase: 1,
"consistent-return": 1,
"max-nested-callbacks": [1, 3],
"new-cap": 1,
"no-extra-boolean-cast": 1,
"no-lonely-if": 1,
"no-new": 1,
"no-new-wrappers": 1,
"no-redeclare": 1,
"no-unused-expressions": 1,
"no-use-before-define": [1, "nofunc"],
"no-warning-comments": 1,
strict: 1,

// This rule must be disabled as of ESLint 9. It's removed and causes issues when present.
// https://eslint.org/docs/latest/rules/valid-jsdoc
"valid-jsdoc": 0,

"default-case": 1,
"dot-notation": 0,
"eol-last": 0,
eqeqeq: 0,
"no-trailing-spaces": 0,
"no-underscore-dangle": 0,
quotes: 0,
"key-spacing": 0,
"comma-spacing": 0,
"no-multi-spaces": 0,
"no-shadow": 0,
"no-irregular-whitespace": 0,
},
},
];
61 changes: 61 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
},
"devDependencies": {
"@ui5/cli": "^3.11.0",
<<<<<<< Updated upstream
"eslint": "^9.8.0",
=======
"eslint": "^8.57.0",
"globals": "^15.8.0",
>>>>>>> Stashed changes
"karma": "^6.4.3",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage": "^2.2.1",
Expand Down

0 comments on commit 6e3b1b9

Please sign in to comment.