Skip to content
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

Update eslint 8.57.0 → 9.10.0 (major) #601

Merged
merged 4 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 0 additions & 11 deletions .eslintrc.js

This file was deleted.

54 changes: 54 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import prettier from 'eslint-plugin-prettier';
import babelParser from '@babel/eslint-parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import { fixupPluginRules, fixupConfigRules } from '@eslint/compat';
import importPlugin from 'eslint-plugin-import';

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 [
...fixupConfigRules(compat.extends('airbnb', 'airbnb/hooks')),
...compat.extends('prettier', 'plugin:prettier/recommended'),
{
plugins: {
prettier,
import: fixupPluginRules(importPlugin),
},

languageOptions: {
globals: {
fetch: 'readonly',
JSX: true,
},

parser: babelParser,
},

settings: {
'import/resolver': {
node: {},
exports: {},
},
},

rules: {
'react/jsx-filename-extension': 'off',
'no-underscore-dangle': 'off',
'react/forbid-prop-types': 'off',
'react/jsx-fragments': 'off',
'react/jsx-filename-extension': 'off',
// 'import/extensions': ['error', 'ignorePackages'],
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
},
},
];
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"test": "jest --verbose",
"test:watch": "npm test -- --watch",
"lint": "eslint src/**/*.jsx src/**/*.js __test__/**/*.js",
"lint": "eslint src/**/*.js __test__/**/*.js",
"lint:fix": "npm run lint -- --fix",
"dtslint": "dtslint types",
"build": "rimraf cjs es && npx browserslist --update-db && NODE_ENV=cjs babel src -d cjs && NODE_ENV=es babel src -d es",
Expand Down Expand Up @@ -63,7 +63,10 @@
"@types/react": "18.2.56",
"dayjs": "1.11.13",
"dtslint": "4.2.1",
"eslint": "8.57.0",
"eslint": "9.10.0",
"@eslint/compat": "1.1.1",
"@eslint/eslintrc": "3.1.0",
"@eslint/js": "9.9.1",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.30.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { forceComponentsUpdate } from './components/Base';
export { default as Translate } from './components/Translate';
export { default as Localize } from './components/Localize';
export { default as I18n } from './components/I18n';
export { forceComponentsUpdate } from './components/Base.js';
export { default as Translate } from './components/Translate.js';
export { default as Localize } from './components/Localize.js';
export { default as I18n } from './components/I18n.js';
export { getLocale, setLocale, setLocaleGetter, getTranslations, setTranslations, setTranslationsGetter, setHandleMissingTranslation, setHandleFailedLocalization } from './lib/settings';
export { default as translate } from './lib/translate';
export { default as t } from './lib/translate';
Expand Down
Loading
Loading