Skip to content

Commit

Permalink
ab-core uses eslint 9 (take 2) (#1696)
Browse files Browse the repository at this point in the history
  • Loading branch information
sndrs authored Sep 6, 2024
2 parents 10cd942 + 7255785 commit d5e20ad
Show file tree
Hide file tree
Showing 62 changed files with 312 additions and 1,224 deletions.
64 changes: 0 additions & 64 deletions .eslintrc.cjs

This file was deleted.

4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,6 @@ install: check-node-version
@guardian/source\:verify-dist: env
@corepack pnpm --filter @guardian/source verify-dist

.PHONY: @guardian/source\:wireit
@guardian/source\:wireit: env
@corepack pnpm --filter @guardian/source wireit

.PHONY: @guardian/source-development-kitchen\:build
@guardian/source-development-kitchen\:build: env
@corepack pnpm --filter @guardian/source-development-kitchen build
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ Project-specific tasks are defined as `scripts` in their `package.json`, and can
- `make @guardian/source:test`
- `make @guardian/source:tsc`
- `make @guardian/source:verify-dist`
- `make @guardian/source:wireit`

#### @guardian/source-development-kitchen

Expand Down
33 changes: 0 additions & 33 deletions libs/@guardian/ab-core/.eslintrc.cjs

This file was deleted.

13 changes: 13 additions & 0 deletions libs/@guardian/ab-core/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import guardian from '@guardian/eslint-config';

export default [
...guardian.configs.recommended,
...guardian.configs.jest,
{
ignores: [
'dist',
'jest.dist.*', // depends on build output, so don't lint it
'.wireit',
],
},
];
1 change: 0 additions & 1 deletion libs/@guardian/ab-core/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ const config = {
testEnvironment: 'jest-environment-jsdom',
};

// eslint-disable-next-line import/no-default-export -- that's what jest likes
export default config;
4 changes: 2 additions & 2 deletions libs/@guardian/ab-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"verify-dist": "wireit"
},
"devDependencies": {
"@guardian/eslint-config": "workspace:*",
"@types/jest": "29.5.8",
"eslint": "9.9.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"rollup": "4.21.0",
Expand Down Expand Up @@ -65,7 +67,6 @@
"command": "eslint --cache --color . --fix",
"files": [
"**",
"../../../.eslint*",
"!(dist)/**",
"!.eslintcache"
],
Expand All @@ -78,7 +79,6 @@
"command": "eslint --cache --color .",
"files": [
"**",
"../../../.eslint*",
"!(dist)/**",
"!.eslintcache"
],
Expand Down
33 changes: 0 additions & 33 deletions libs/@guardian/ab-react/.eslintrc.cjs

This file was deleted.

14 changes: 14 additions & 0 deletions libs/@guardian/ab-react/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import guardian from '@guardian/eslint-config';

export default [
...guardian.configs.recommended,
...guardian.configs.jest,
...guardian.configs.react,
{
ignores: [
'dist',
'jest.dist.*', // depends on build output, so don't lint it
'.wireit',
],
},
];
2 changes: 0 additions & 2 deletions libs/@guardian/ab-react/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable import/no-default-export -- that's what jest likes */

import { config as baseConfig } from '../../../configs/jest.config.js';

/** @typedef {import("jest").Config} Config */
Expand Down
4 changes: 2 additions & 2 deletions libs/@guardian/ab-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
},
"devDependencies": {
"@guardian/ab-core": "8.0.0",
"@guardian/eslint-config": "workspace:*",
"@testing-library/react": "14.2.1",
"@types/jest": "29.5.8",
"@types/react": "18.2.79",
"eslint": "9.9.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"react": "18.2.0",
Expand Down Expand Up @@ -88,7 +90,6 @@
],
"files": [
"**",
"../../../.eslint*",
"!(dist)/**",
"!.eslintcache"
],
Expand All @@ -104,7 +105,6 @@
],
"files": [
"**",
"../../../.eslint*",
"!(dist)/**",
"!.eslintcache"
],
Expand Down
24 changes: 0 additions & 24 deletions libs/@guardian/browserslist-config/.eslintrc.cjs

This file was deleted.

8 changes: 8 additions & 0 deletions libs/@guardian/browserslist-config/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import guardian from '@guardian/eslint-config';

export default [
...guardian.configs.recommended,
{
ignores: ['.wireit'],
},
];
4 changes: 2 additions & 2 deletions libs/@guardian/browserslist-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
},
"devDependencies": {
"@guardian/browserslist-config": "workspace:*",
"@guardian/eslint-config": "workspace:*",
"browserslist": "4.23.0",
"eslint": "9.9.0",
"tslib": "2.6.2",
"wireit": "0.14.8"
},
Expand All @@ -32,7 +34,6 @@
"clean": false,
"files": [
"**",
"../../../.eslint*",
"!.eslintcache"
],
"output": [
Expand All @@ -43,7 +44,6 @@
"command": "eslint --cache --color .",
"files": [
"**",
"../../../.eslint*",
"!.eslintcache"
],
"output": []
Expand Down
6 changes: 5 additions & 1 deletion libs/@guardian/browserslist-config/scripts/usage-table.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import browserslistStats from '../browserslist-stats.json' assert { type: 'json' };
import { readFileSync } from 'fs';
import { normaliseBrowserName } from './normalise-browser-name.mjs';

const browserslistStats = JSON.parse(
readFileSync('../browserslist-stats.json'),
);

const flattened = {};

// flatten the stats to { browserVersion: usage } shape
Expand Down
37 changes: 0 additions & 37 deletions libs/@guardian/core-web-vitals/.eslintrc.cjs

This file was deleted.

13 changes: 13 additions & 0 deletions libs/@guardian/core-web-vitals/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import guardian from '@guardian/eslint-config';

export default [
...guardian.configs.recommended,
...guardian.configs.jest,
{
ignores: [
'dist',
'jest.dist.*', // depends on build output, so don't lint it
'.wireit',
],
},
];
2 changes: 0 additions & 2 deletions libs/@guardian/core-web-vitals/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable import/no-default-export -- that's what jest likes */

import { config as baseConfig } from '../../../configs/jest.config.js';

/** @typedef {import("jest").Config} Config */
Expand Down
Loading

0 comments on commit d5e20ad

Please sign in to comment.