Skip to content

Commit

Permalink
Merge pull request #2796 from ChristianMurphy/chore/migrate-to-eslint-9
Browse files Browse the repository at this point in the history
chore: upgrade to ESLint 9, migrate configuration file to flat format
  • Loading branch information
ChristianMurphy authored May 7, 2024
2 parents 9ee5202 + 0a7d9e1 commit 1903a0a
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 567 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*.less text eol=lf
*.md text eol=lf
*.MF text eol=lf
*.mjs text eol=lf
*.Module text eol=lf
*.pl text eol=lf
*.pom text eol=lf
Expand Down
46 changes: 46 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import js from '@eslint/js';
import sonarjs from 'eslint-plugin-sonarjs';
import * as unicorn from 'eslint-plugin-unicorn';
import prettier from 'eslint-plugin-prettier/recommended';
import globals from 'globals';

export default [
{
ignores: ['**/*.min.js', '**/build/**'],
},
js.configs.recommended,
sonarjs.configs.recommended,
unicorn.configs['flat/recommended'],
prettier,
{
languageOptions: {
globals: {
...globals.browser,
...globals.es2021,
jQuery: false,
$: false,
_: false,
up: false,
fluid: false,
},
},
rules: {
'no-redeclare': [
'error',
{
builtinGlobals: false,
},
],
'sonarjs/cognitive-complexity': 'off',
'sonarjs/no-duplicate-string': 'off',
'unicorn/filename-case': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-for-loop': 'off',
'unicorn/no-null': 'off',
'unicorn/no-this-assignment': 'off',
'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-spread': 'off',
},
},
];
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ logbackVersion=1.3.5
lombokVersion=1.18.32
mockitoVersion=4.11.0
luceneVersion=8.11.2
nodejsVersion=20.9.0
nodejsVersion=20.13.0
oauthVersion=20100527
orgJsonVersion=20240303
personDirectoryVersion=1.8.11
Expand Down
Loading

0 comments on commit 1903a0a

Please sign in to comment.