Skip to content

Commit

Permalink
Update eslint 8.57.0 → 9.10.0 (major) (#601)
Browse files Browse the repository at this point in the history
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Gerben Meyer <[email protected]>
  • Loading branch information
depfu[bot] and gerbenmeyer authored Sep 12, 2024
1 parent 3964642 commit 4c9b033
Show file tree
Hide file tree
Showing 9 changed files with 187 additions and 155 deletions.
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

0 comments on commit 4c9b033

Please sign in to comment.