Skip to content

refactor: Bump eslint from 8.24.0 to 9.22.0 #2692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 23, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion Parse-Dashboard/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ module.exports = function(config, options) {
//Check also if the icons really exist
checkIfIconsExistForApps(config.apps, config.iconsFolder);
}
} catch (e) {
} catch {
// Directory doesn't exist or something.
console.warn('Iconsfolder at path: ' + config.iconsFolder +
' not found!');
Expand Down
78 changes: 78 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
const { defineConfig } = require('eslint/config');
const { includeIgnoreFile } = require('@eslint/compat');
const path = require('node:path');
const globals = require('globals');

const gitignorePath = path.resolve(__dirname, '.gitignore');

const js = require('@eslint/js');
const babelParser = require('@babel/eslint-parser');
const reactPlugin = require('eslint-plugin-react');
const jestPlugin = require('eslint-plugin-jest');

module.exports = defineConfig([
includeIgnoreFile(gitignorePath), // Load ignores from .gitignore
js.configs.recommended,
reactPlugin.configs.flat.recommended,
{
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
languageOptions: {
parser: babelParser,
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
requireConfigFile: false
},
globals: {
...globals.builtin,
...globals.browser,
...globals.es6,
...globals.node,
}
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'indent': ['error', 2, { 'SwitchCase': 1 }],
'linebreak-style': ['error', 'unix'],
'no-trailing-spaces': 'error',
'eol-last': 'error',
'space-in-parens': ['error', 'never'],
'no-multiple-empty-lines': 'warn',
'prefer-const': 'error',
'space-infix-ops': 'error',
'no-useless-escape': 'off',
'require-atomic-updates': 'off',
'react/jsx-uses-vars': 'warn',
'react/jsx-uses-react': 'warn',
'react/react-in-jsx-scope': 'warn',
'no-console': 'off',
'no-case-declarations': 'off',
'quotes': ['error', 'single'],
'no-var': 'error',
'no-prototype-builtins': 'off',
'curly': ['error', 'all'],
'react/no-deprecated': 'off',
'react/prop-types': 'off',
'react/no-string-refs': 'off',
}
},
{
files: ['**/*.test.js', '**/*.test.jsx', '**/*.test.ts', '**/*.test.tsx'],
plugins: {
jest: jestPlugin
},
languageOptions: {
globals: {
...globals.builtin,
...globals.browser,
...globals.es6,
...globals.node,
...globals.jest
}
},
}
]);
Loading
Loading