Skip to content

Commit

Permalink
Bump eslint from 8.57.0 to 9.17.0 (#7222)
Browse files Browse the repository at this point in the history
* Bump eslint from 8.57.0 to 9.17.0

Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.17.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.57.0...v9.17.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* upgrade

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Night <[email protected]>
  • Loading branch information
dependabot[bot] and night authored Dec 23, 2024
1 parent 325ae44 commit 504022f
Show file tree
Hide file tree
Showing 26 changed files with 506 additions and 408 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

53 changes: 0 additions & 53 deletions .eslintrc

This file was deleted.

3 changes: 1 addition & 2 deletions dev/post-install.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {statSync, writeFileSync, readFileSync, lstatSync} from 'fs';
// eslint-disable-next-line import/no-unresolved

import {globSync} from 'glob';
import {escapeRegExp} from '../src/utils/regex.js';

Expand All @@ -16,7 +16,6 @@ const files = globSync('node_modules/*rsuite*/**/*.+(js|ts|tsx|less|css)', {}).f
);
for (const pathname of files) {
if (lstatSync(pathname).isDirectory()) {
// eslint-disable-next-line no-console
console.warn(`[POST INSTALL] Processing file ${pathname}, but it is a directory. skipping...`);
continue;
}
Expand Down
85 changes: 85 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import babelParser from '@babel/eslint-parser';
import {fixupConfigRules} from '@eslint/compat';
import {FlatCompat} from '@eslint/eslintrc';
import js from '@eslint/js';
import globals from 'globals';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: ['**/build', '**/node_modules'],
},
...fixupConfigRules(
compat.extends(
'plugin:import/recommended',
'plugin:react/recommended',
'plugin:eslint-plugin/recommended',
'plugin:prettier/recommended'
)
),
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},

parser: babelParser,
ecmaVersion: 6,
sourceType: 'module',

parserOptions: {
requireConfigFile: false,
allowImportExportEverywhere: true,

babelOptions: {
presets: ['@babel/preset-react'],
},
},
},

settings: {
react: {
version: 'detect',
},
},

rules: {
'prettier/prettier': ['error'],
'import/extensions': ['error', 'ignorePackages'],
'react/prop-types': 'off',
'react/jsx-props-no-spreading': 'off',
'no-param-reassign': 'off',
'no-underscore-dangle': 'off',
'no-continue': 'off',
'no-restricted-syntax': 'off',
'class-methods-use-this': 'off',
'no-plusplus': 'off',
'no-empty': 'off',
'max-classes-per-file': 'off',
'no-bitwise': 'off',
'import/no-named-as-default': 'off',

'import/order': [
'error',
{
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],

alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
},
];
Loading

0 comments on commit 504022f

Please sign in to comment.