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 to eslint 9 #40555

Merged
merged 9 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintignore.root
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
*.min.js
**/changelog/

# Storybook files
**/@(storybook|stories)/**/*.js

# Ignored by default, but we should check it
!.github/
!.prettierrc.js
Expand Down
11 changes: 0 additions & 11 deletions .eslintrc.js

This file was deleted.

9 changes: 0 additions & 9 deletions .github/.eslintrc.js

This file was deleted.

11 changes: 11 additions & 0 deletions .github/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [
...makeBaseConfig( import.meta.url, { envs: [ 'node' ] } ),
{
rules: {
'no-console': 'off',
'n/no-process-exit': 'off',
},
},
];
3 changes: 3 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [ ...makeBaseConfig( import.meta.url ) ];
3 changes: 3 additions & 0 deletions projects/github-actions/repo-gardening/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [ ...makeBaseConfig( import.meta.url, { envs: [ 'node', 'commonjs' ] } ) ];
3 changes: 3 additions & 0 deletions projects/github-actions/required-review/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [ ...makeBaseConfig( import.meta.url, { envs: [ 'node', 'commonjs' ] } ) ];
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [ ...makeBaseConfig( import.meta.url, { envs: [ 'node', 'commonjs' ] } ) ];
13 changes: 0 additions & 13 deletions projects/js-packages/ai-client/.eslintrc.cjs

This file was deleted.

8 changes: 8 additions & 0 deletions projects/js-packages/ai-client/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [
...makeBaseConfig( import.meta.url, { react: false, textdomain: 'jetpack-ai-client' } ),

// @todo: Set `react: true` above and remove this dummy block.
{ name: 'Monorepo react config' },
];
27 changes: 0 additions & 27 deletions projects/js-packages/boost-score-api/.eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions projects/js-packages/boost-score-api/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [ ...makeBaseConfig( import.meta.url, { textdomain: 'boost-score-api' } ) ];
12 changes: 0 additions & 12 deletions projects/js-packages/charts/.eslintrc.cjs

This file was deleted.

5 changes: 5 additions & 0 deletions projects/js-packages/charts/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [
...makeBaseConfig( import.meta.url, { react: true, textdomain: 'jetpack-charts' } ),
];
12 changes: 0 additions & 12 deletions projects/js-packages/components/.eslintrc.cjs

This file was deleted.

5 changes: 5 additions & 0 deletions projects/js-packages/components/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [
...makeBaseConfig( import.meta.url, { react: true, textdomain: 'jetpack-components' } ),
];
12 changes: 0 additions & 12 deletions projects/js-packages/connection/.eslintrc.cjs

This file was deleted.

5 changes: 5 additions & 0 deletions projects/js-packages/connection/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [
...makeBaseConfig( import.meta.url, { react: true, textdomain: 'jetpack-connection-js' } ),
];
13 changes: 13 additions & 0 deletions projects/js-packages/critical-css-gen/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [
...makeBaseConfig( import.meta.url ),
{
rules: {
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', caughtErrors: 'none' },
],
},
},
];
5 changes: 0 additions & 5 deletions projects/js-packages/eslint-changed/.eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions projects/js-packages/eslint-changed/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [ ...makeBaseConfig( import.meta.url, { envs: [ 'node' ] } ) ];
12 changes: 0 additions & 12 deletions projects/js-packages/idc/.eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions projects/js-packages/idc/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [ ...makeBaseConfig( import.meta.url, { react: true, textdomain: 'jetpack-idc' } ) ];
48 changes: 0 additions & 48 deletions projects/js-packages/image-guide/.eslintrc.cjs

This file was deleted.

25 changes: 25 additions & 0 deletions projects/js-packages/image-guide/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* eslint-disable import/no-extraneous-dependencies */
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';
import svelteConfig from 'jetpack-js-tools/eslintrc/svelte.mjs';

export default [
...makeBaseConfig( import.meta.url, { textdomain: 'jetpack-image-guide' } ),
...svelteConfig,
{
rules: {
'import/no-extraneous-dependencies': 'error',

'space-in-parens': 'off',
'computed-property-spacing': 'off',

'jsdoc/require-jsdoc': 'off',
'jsdoc/require-description': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-param-type': 'off',

'import/order': 'off',
'no-nested-ternary': 'off',
},
},
];
12 changes: 0 additions & 12 deletions projects/js-packages/licensing/.eslintrc.cjs

This file was deleted.

5 changes: 5 additions & 0 deletions projects/js-packages/licensing/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [
...makeBaseConfig( import.meta.url, { react: true, textdomain: 'jetpack-licensing' } ),
];
12 changes: 0 additions & 12 deletions projects/js-packages/partner-coupon/.eslintrc.cjs

This file was deleted.

5 changes: 5 additions & 0 deletions projects/js-packages/partner-coupon/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import makeBaseConfig from 'jetpack-js-tools/eslintrc/base.mjs';

export default [
...makeBaseConfig( import.meta.url, { react: true, textdomain: 'jetpack-partner-coupon' } ),
];
12 changes: 0 additions & 12 deletions projects/js-packages/publicize-components/.eslintrc.js

This file was deleted.

10 changes: 10 additions & 0 deletions projects/js-packages/publicize-components/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import makeBaseConfig, { config } from 'jetpack-js-tools/eslintrc/base.mjs';
import jestConfig from 'jetpack-js-tools/eslintrc/jest.mjs';

export default [
...makeBaseConfig( import.meta.url, { react: true, textdomain: 'jetpack-publicize-components' } ),
...config( {
files: [ 'src/utils/test-factory.js' ],
extends: [ jestConfig ],
} ),
];
30 changes: 0 additions & 30 deletions projects/js-packages/react-data-sync-client/.eslintrc.cjs

This file was deleted.

Loading