diff --git a/examples/auth-with-jwt/.eslintrc.js b/examples/auth-with-jwt/.eslintrc.js deleted file mode 100644 index b59b405..0000000 --- a/examples/auth-with-jwt/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - root: true, - extends: ['@lynxtaa/eslint-config', '@lynxtaa/eslint-config/requires-typechecking'], - parserOptions: { - tsconfigRootDir: __dirname, - project: ['./tsconfig.json'], - }, -} diff --git a/examples/auth-with-jwt/eslint.config.mjs b/examples/auth-with-jwt/eslint.config.mjs new file mode 100644 index 0000000..c1e06aa --- /dev/null +++ b/examples/auth-with-jwt/eslint.config.mjs @@ -0,0 +1,19 @@ +import eslintConfig from '@lynxtaa/eslint-config' +import requiresTypechecking from '@lynxtaa/eslint-config/requires-typechecking' + +// TODO: add jest +export default [ + ...eslintConfig, + ...requiresTypechecking, + { + languageOptions: { + parserOptions: { + projectService: { + allowDefaultProject: ['eslint.config.mjs'], + }, + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + tsconfigRootDir: import.meta.dirname, + }, + }, + }, +] diff --git a/examples/auth-with-jwt/package.json b/examples/auth-with-jwt/package.json index c975309..0f142f1 100644 --- a/examples/auth-with-jwt/package.json +++ b/examples/auth-with-jwt/package.json @@ -6,7 +6,7 @@ "check-format": "pnpm run prettier --check", "check-types": "tsc", "format": "pnpm run prettier --write", - "lint": "eslint --max-warnings 0 --ext js,ts .", + "lint": "eslint --max-warnings 0 .", "prettier": "prettier ." }, "prettier": "@lynxtaa/prettier-config", diff --git a/examples/next-js/.eslintignore b/examples/next-js/.eslintignore deleted file mode 100644 index 4cb1d53..0000000 --- a/examples/next-js/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -lib/graphql-queries.ts diff --git a/examples/next-js/.eslintrc.js b/examples/next-js/.eslintrc.js deleted file mode 100644 index 5c676b7..0000000 --- a/examples/next-js/.eslintrc.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - root: true, - plugins: ['jest'], - extends: [ - 'next/core-web-vitals', - '@lynxtaa/eslint-config', - '@lynxtaa/eslint-config/requires-typechecking', - 'plugin:jest/recommended', - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: ['./tsconfig.json'], - }, -} diff --git a/examples/next-js/eslint.config.mjs b/examples/next-js/eslint.config.mjs new file mode 100644 index 0000000..545ab49 --- /dev/null +++ b/examples/next-js/eslint.config.mjs @@ -0,0 +1,23 @@ +import eslintConfig from '@lynxtaa/eslint-config' +import requiresTypechecking from '@lynxtaa/eslint-config/requires-typechecking' +import jest from 'eslint-plugin-jest' + +// TODO: add ...compat.extends('next/core-web-vitals'), +export default [ + ...eslintConfig, + ...requiresTypechecking, + jest.configs['flat/recommended'], + { + languageOptions: { + parserOptions: { + projectService: { + allowDefaultProject: ['eslint.config.mjs'], + }, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, + { + ignores: ['lib/graphql-queries.ts'], + }, +] diff --git a/examples/next-js/package.json b/examples/next-js/package.json index b1330f5..b2e7760 100644 --- a/examples/next-js/package.json +++ b/examples/next-js/package.json @@ -8,7 +8,7 @@ "dev": "next dev", "format": "pnpm run prettier --write", "gql-codegen": "graphql-codegen --config graphql-codegen.ts", - "lint": "eslint --max-warnings 0 --ext js,ts,tsx jest lib pages tests", + "lint": "eslint --max-warnings 0 jest lib pages tests", "prettier": "prettier \"{lib,pages,tests}/**\" *.{js,ts,json,md}", "start": "next start", "test": "jest", @@ -37,6 +37,7 @@ "@types/react": "18.3.3", "eslint": "9.14.0", "eslint-config-next": "14.2.5", + "eslint-plugin-jest": "28.8.3", "graphql": "16.9.0", "jest": "29.7.0", "msw": "1.3.3", diff --git a/examples/typed-document-node/.eslintignore b/examples/typed-document-node/.eslintignore deleted file mode 100644 index fe343d6..0000000 --- a/examples/typed-document-node/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -src/gql-documents.ts diff --git a/examples/typed-document-node/.eslintrc.js b/examples/typed-document-node/.eslintrc.js deleted file mode 100644 index b59b405..0000000 --- a/examples/typed-document-node/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - root: true, - extends: ['@lynxtaa/eslint-config', '@lynxtaa/eslint-config/requires-typechecking'], - parserOptions: { - tsconfigRootDir: __dirname, - project: ['./tsconfig.json'], - }, -} diff --git a/examples/typed-document-node/eslint.config.mjs b/examples/typed-document-node/eslint.config.mjs new file mode 100644 index 0000000..89e962d --- /dev/null +++ b/examples/typed-document-node/eslint.config.mjs @@ -0,0 +1,22 @@ +import eslintConfig from '@lynxtaa/eslint-config' +import requiresTypechecking from '@lynxtaa/eslint-config/requires-typechecking' + +// TODO: add jest +export default [ + ...eslintConfig, + ...requiresTypechecking, + { + languageOptions: { + parserOptions: { + projectService: { + allowDefaultProject: ['eslint.config.mjs'], + }, + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + tsconfigRootDir: import.meta.dirname, + }, + }, + }, + { + ignores: ['src/gql-documents.ts'], + }, +] diff --git a/examples/typed-document-node/package.json b/examples/typed-document-node/package.json index 08551e4..aeb4268 100644 --- a/examples/typed-document-node/package.json +++ b/examples/typed-document-node/package.json @@ -9,7 +9,7 @@ "check-types": "tsc", "format": "pnpm run prettier --write", "gql-codegen": "graphql-codegen --config graphql-codegen.yml", - "lint": "eslint --max-warnings 0 --ext js,ts src", + "lint": "eslint --max-warnings 0 src", "prettier": "prettier src", "start": "pnpm run build && node build/index.js" }, diff --git a/examples/with-undici/.eslintrc.js b/examples/with-undici/.eslintrc.js deleted file mode 100644 index b59b405..0000000 --- a/examples/with-undici/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - root: true, - extends: ['@lynxtaa/eslint-config', '@lynxtaa/eslint-config/requires-typechecking'], - parserOptions: { - tsconfigRootDir: __dirname, - project: ['./tsconfig.json'], - }, -} diff --git a/examples/with-undici/eslint.config.mjs b/examples/with-undici/eslint.config.mjs new file mode 100644 index 0000000..2afe2c4 --- /dev/null +++ b/examples/with-undici/eslint.config.mjs @@ -0,0 +1,18 @@ +import eslintConfig from '@lynxtaa/eslint-config' +import requiresTypechecking from '@lynxtaa/eslint-config/requires-typechecking' + +// TODO: add jest +export default [ + ...eslintConfig, + ...requiresTypechecking, + { + languageOptions: { + parserOptions: { + projectService: { + allowDefaultProject: ['eslint.config.mjs'], + }, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, +] diff --git a/examples/with-undici/package.json b/examples/with-undici/package.json index 0d2ed3e..a476526 100644 --- a/examples/with-undici/package.json +++ b/examples/with-undici/package.json @@ -6,7 +6,7 @@ "check-format": "pnpm run prettier --check", "check-types": "tsc", "format": "pnpm run prettier --write", - "lint": "eslint --max-warnings 0 --ext js,ts src", + "lint": "eslint --max-warnings 0 src", "prettier": "prettier src" }, "prettier": "@lynxtaa/prettier-config", diff --git a/packages/awesome-graphql-client/eslint.config.mjs b/packages/awesome-graphql-client/eslint.config.mjs index 1c411e5..71b3bea 100644 --- a/packages/awesome-graphql-client/eslint.config.mjs +++ b/packages/awesome-graphql-client/eslint.config.mjs @@ -2,7 +2,6 @@ import eslintConfig from '@lynxtaa/eslint-config' import requiresTypechecking from '@lynxtaa/eslint-config/requires-typechecking' import jest from 'eslint-plugin-jest' -// TODO: add jest export default [ ...eslintConfig, ...requiresTypechecking, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae5e052..77ddcff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -81,7 +81,7 @@ importers: version: 6.1.0(graphql@16.9.0) '@lynxtaa/eslint-config': specifier: 0.11.0 - version: 0.11.0(jiti@1.21.6)(typescript@5.6.3) + version: 0.11.0(@typescript-eslint/parser@8.12.2(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(jiti@1.21.6)(typescript@5.6.3) '@lynxtaa/prettier-config': specifier: 0.2.0 version: 0.2.0(prettier@3.3.3) @@ -112,6 +112,9 @@ importers: eslint-config-next: specifier: 14.2.5 version: 14.2.5(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3) + eslint-plugin-jest: + specifier: 28.8.3 + version: 28.8.3(@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.14.0(jiti@1.21.6))(jest@29.7.0(@types/node@20.14.12))(typescript@5.6.3) graphql: specifier: 16.9.0 version: 16.9.0 @@ -8797,8 +8800,8 @@ snapshots: '@typescript-eslint/parser': 7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3) eslint: 9.14.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@9.14.0(jiti@1.21.6)))(eslint@9.14.0(jiti@1.21.6)) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@9.14.0(jiti@1.21.6)) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@9.14.0(jiti@1.21.6)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.12.2(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.14.0(jiti@1.21.6)) eslint-plugin-jsx-a11y: 6.9.0(eslint@9.14.0(jiti@1.21.6)) eslint-plugin-react: 7.35.0(eslint@9.14.0(jiti@1.21.6)) eslint-plugin-react-hooks: 4.6.2(eslint@9.14.0(jiti@1.21.6)) @@ -8820,13 +8823,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@9.14.0(jiti@1.21.6)))(eslint@9.14.0(jiti@1.21.6)): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@9.14.0(jiti@1.21.6)): dependencies: debug: 4.3.6 enhanced-resolve: 5.17.1 eslint: 9.14.0(jiti@1.21.6) eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@9.14.0(jiti@1.21.6)) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@9.14.0(jiti@1.21.6)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.12.2(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.14.0(jiti@1.21.6)) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.15.1 @@ -8844,7 +8847,7 @@ snapshots: '@typescript-eslint/parser': 7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3) eslint: 9.14.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0(eslint@9.14.0(jiti@1.21.6)))(eslint@9.14.0(jiti@1.21.6)) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@9.14.0(jiti@1.21.6)) transitivePeerDependencies: - supports-color @@ -8858,33 +8861,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-typescript@3.6.1)(eslint@9.14.0(jiti@1.21.6)): + eslint-module-utils@2.12.0(eslint-import-resolver-node@0.3.9)(eslint@9.14.0(jiti@1.21.6)): dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.2 - array.prototype.flatmap: 1.3.2 debug: 3.2.7 - doctrine: 2.1.0 + optionalDependencies: eslint: 9.14.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@9.14.0(jiti@1.21.6)) - hasown: 2.0.2 - is-core-module: 2.15.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.0 - semver: 6.3.1 - string.prototype.trimend: 1.0.8 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3) transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - supports-color eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.12.2(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.14.0(jiti@1.21.6)): @@ -8927,7 +8910,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.14.0(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.2.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@9.14.0(jiti@1.21.6)) + eslint-module-utils: 2.12.0(eslint-import-resolver-node@0.3.9)(eslint@9.14.0(jiti@1.21.6)) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3