Skip to content
Open
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
8 changes: 8 additions & 0 deletions .changeset/two-coins-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"eslint-config-godaddy-react-typescript": major
"eslint-config-godaddy-typescript": major
"eslint-config-godaddy-react": major
"eslint-config-godaddy": major
---

Upgrade to ESLint 10
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
},
"devDependencies": {
"@changesets/cli": "^2.29.5",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.24.0",
"@typescript-eslint/eslint-plugin": "^8.35.0",
"@typescript-eslint/parser": "^8.30.1",
"eslint": "^9.24.0",
"@eslint/eslintrc": "^3.3.4",
"@eslint/js": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"eslint": "^10.0.2",
"eslint-plugin-json": "^4.0.1",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-mocha": "^10.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
],
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^8.35.0",
"@typescript-eslint/parser": "^8.30.1",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"eslint-config-godaddy-react": "workspace:^",
"eslint-plugin-react-hooks": "^5.2.0"
},
"peerDependencies": {
"eslint": "^9",
"eslint": "^10",
"typescript": ">=5"
},
"devDependencies": {
"eslint": "^9.24.0"
"eslint": "^10.0.2"
},
"exports": {
".": "./index.js"
Expand Down
8 changes: 6 additions & 2 deletions packages/eslint-config-godaddy-react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import gdConfig from 'eslint-config-godaddy';
import react from 'eslint-plugin-react';
import jsxA11y from 'eslint-plugin-jsx-a11y';

import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
import { FlatCompat } from '@eslint/eslintrc';
import path from 'path';
import { fileURLToPath } from 'url';
Expand All @@ -14,9 +15,12 @@ const compat = new FlatCompat({
baseDirectory: __dirname
});

// Wrap react plugin for ESLint 10 compatibility (context.getFilename etc.)
const reactCompat = fixupPluginRules(react);

const config = [
...gdConfig,
react.configs.flat.recommended,
...fixupConfigRules([react.configs.flat.recommended]),
// This is needed due to react-hooks not being Flat Config compatible there is an open
// issue for this https://github.com/facebook/react/issues/28313 and PR for this change
// https://github.com/facebook/react/pull/30774
Expand All @@ -33,7 +37,7 @@ const config = [
}
},
plugins: {
react,
react: reactCompat,
jsxA11y
},
rules: {
Expand Down
7 changes: 4 additions & 3 deletions packages/eslint-config-godaddy-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@
],
"peerDependencies": {
"@babel/core": ">=7",
"eslint": "^9"
"eslint": "^10"
},
"dependencies": {
"@babel/eslint-parser": "^7.27.0",
"@babel/eslint-parser": "^7.28.6",
"@eslint/compat": "^2.0.2",
"eslint-config-godaddy": "workspace:^",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0"
},
"devDependencies": {
"eslint": "^9.24.0"
"eslint": "^10.0.2"
},
"exports": {
".": "./index.js"
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-config-godaddy-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
],
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^8.35.0",
"@typescript-eslint/parser": "^8.30.1",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"eslint-config-godaddy": "workspace:^"
},
"peerDependencies": {
"eslint": "^9",
"eslint": "^10",
"typescript": ">=5"
},
"devDependencies": {
"eslint": "^9.24.0"
"eslint": "^10.0.2"
},
"exports": {
".": "./index.js"
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config-godaddy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
"eslint"
],
"peerDependencies": {
"eslint": "^9"
"eslint": "^10"
},
"dependencies": {
"@eslint/js": "^10.0.0",
"eslint-plugin-jsdoc": "^50.6.9",
"eslint-plugin-json": "^4.0.1",
"eslint-plugin-mocha": "^10.5.0",
"globals": "^16.0.0"
},
"devDependencies": {
"@eslint/js": "^9.24.0",
"eslint": "^9.24.0"
"eslint": "^10.0.0"
},
"exports": {
".": "./index.js"
Expand Down
Loading