Skip to content

Commit 4c9b033

Browse files
Update eslint 8.57.0 → 9.10.0 (major) (#601)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Co-authored-by: Gerben Meyer <[email protected]>
1 parent 3964642 commit 4c9b033

9 files changed

+187
-155
lines changed

.eslintrc.js

-11
This file was deleted.

eslint.config.mjs

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import prettier from 'eslint-plugin-prettier';
2+
import babelParser from '@babel/eslint-parser';
3+
import path from 'node:path';
4+
import { fileURLToPath } from 'node:url';
5+
import js from '@eslint/js';
6+
import { FlatCompat } from '@eslint/eslintrc';
7+
import { fixupPluginRules, fixupConfigRules } from '@eslint/compat';
8+
import importPlugin from 'eslint-plugin-import';
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all,
16+
});
17+
18+
export default [
19+
...fixupConfigRules(compat.extends('airbnb', 'airbnb/hooks')),
20+
...compat.extends('prettier', 'plugin:prettier/recommended'),
21+
{
22+
plugins: {
23+
prettier,
24+
import: fixupPluginRules(importPlugin),
25+
},
26+
27+
languageOptions: {
28+
globals: {
29+
fetch: 'readonly',
30+
JSX: true,
31+
},
32+
33+
parser: babelParser,
34+
},
35+
36+
settings: {
37+
'import/resolver': {
38+
node: {},
39+
exports: {},
40+
},
41+
},
42+
43+
rules: {
44+
'react/jsx-filename-extension': 'off',
45+
'no-underscore-dangle': 'off',
46+
'react/forbid-prop-types': 'off',
47+
'react/jsx-fragments': 'off',
48+
'react/jsx-filename-extension': 'off',
49+
// 'import/extensions': ['error', 'ignorePackages'],
50+
'import/no-named-as-default': 'off',
51+
'import/no-named-as-default-member': 'off',
52+
},
53+
},
54+
];

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scripts": {
99
"test": "jest --verbose",
1010
"test:watch": "npm test -- --watch",
11-
"lint": "eslint src/**/*.jsx src/**/*.js __test__/**/*.js",
11+
"lint": "eslint src/**/*.js __test__/**/*.js",
1212
"lint:fix": "npm run lint -- --fix",
1313
"dtslint": "dtslint types",
1414
"build": "rimraf cjs es && npx browserslist --update-db && NODE_ENV=cjs babel src -d cjs && NODE_ENV=es babel src -d es",
@@ -63,7 +63,10 @@
6363
"@types/react": "18.2.56",
6464
"dayjs": "1.11.13",
6565
"dtslint": "4.2.1",
66-
"eslint": "8.57.0",
66+
"eslint": "9.10.0",
67+
"@eslint/compat": "1.1.1",
68+
"@eslint/eslintrc": "3.1.0",
69+
"@eslint/js": "9.9.1",
6770
"eslint-config-airbnb": "19.0.4",
6871
"eslint-config-prettier": "9.1.0",
6972
"eslint-plugin-import": "2.30.0",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export { forceComponentsUpdate } from './components/Base';
2-
export { default as Translate } from './components/Translate';
3-
export { default as Localize } from './components/Localize';
4-
export { default as I18n } from './components/I18n';
1+
export { forceComponentsUpdate } from './components/Base.js';
2+
export { default as Translate } from './components/Translate.js';
3+
export { default as Localize } from './components/Localize.js';
4+
export { default as I18n } from './components/I18n.js';
55
export { getLocale, setLocale, setLocaleGetter, getTranslations, setTranslations, setTranslationsGetter, setHandleMissingTranslation, setHandleFailedLocalization } from './lib/settings';
66
export { default as translate } from './lib/translate';
77
export { default as t } from './lib/translate';

0 commit comments

Comments
 (0)