Skip to content

Commit

Permalink
Update eslint to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
Enet4 committed Dec 2, 2024
1 parent 17b5c3c commit dc549cd
Show file tree
Hide file tree
Showing 4 changed files with 293 additions and 446 deletions.
87 changes: 0 additions & 87 deletions dicoogle/src/main/resources/webapp/.eslintrc

This file was deleted.

96 changes: 96 additions & 0 deletions dicoogle/src/main/resources/webapp/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
const babelParser = require("@babel/eslint-parser");
const globals = require("globals");
const { configs } = require("@eslint/js");
const reactPlugin = require("eslint-plugin-react");
const importPlugin = require("eslint-plugin-import");

module.exports = [
configs.recommended,
{
languageOptions: {
parser: babelParser,
parserOptions: {
ecmaVersion: 2017,
sourceType: "module",
ecmaFeatures: {
modules: true,
jsx: true
}
},

globals: {
...globals.browser,
...globals.node,
process: false
}
},
plugins: {
react: reactPlugin,
import: importPlugin
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx"]
}
},
react: {
pragma: "React",
version: "15"
}
},
rules: {
"no-console": 0,
quotes: 0,
camelcase: 0,
curly: 0,
"new-cap": 0,
"no-trailing-spaces": 0,
"comma-spacing": 0,
"no-mixed-spaces-and-tabs": 0,
"key-spacing": 0,
"space-infix-ops": 0,
"no-multi-spaces": 0,
"comma-dangle": 0,
"semi-spacing": 0,
eqeqeq: 1,
"no-alert": 1,
"no-unused-vars": [
1,
{
vars: "all",
args: "none",
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
ignoreRestSiblings: true
}
],
"no-extra-semi": 1,
"eol-last": 1,
"no-empty": 1,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-undef": 2,
"import/no-unresolved": [2, { commonjs: true }],
"import/named": 2,
"import/namespace": 2,
"import/default": 2,
"import/export": 2,
"import/no-extraneous-dependencies": 1,
"import/no-mutable-exports": 1,
"react/no-deprecated": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/jsx-boolean-value": 1,
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-undef": 2,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/no-danger": 2,
"react/no-direct-mutation-state": 2,
"react/no-unknown-property": 2,
"react/react-in-jsx-scope": 2,
"react/no-is-mounted": 2
}
}
];
Loading

0 comments on commit dc549cd

Please sign in to comment.