From 07b9e56df5fbce4f62d547455346bfb82fc5916f Mon Sep 17 00:00:00 2001 From: Keng Ye Date: Tue, 7 Jan 2025 20:50:18 +0800 Subject: [PATCH] fix: remove airbnb reference in code Ignore .js during linting --- packages/eslint-config/index.js | 8 +- packages/jest/package.json | 3 + packages/jest/src/WaitForExpect.ts | 1 - packages/standard-linter/README.md | 16 ++-- packages/standard-prettier/package.json | 2 - packages/turbo/package.json | 3 + packages/turbo/src/PackageJson.ts | 1 - packages/turbo/src/TurboPlanCommand.ts | 1 - pnpm-lock.yaml | 103 ------------------------ 9 files changed, 14 insertions(+), 124 deletions(-) diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index 0793d3b0..9a572d68 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -1,11 +1,5 @@ module.exports = { - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "airbnb-base", - "airbnb-typescript/base", - "prettier", - ], + extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], plugins: ["simple-import-sort", "check-file", "unused-imports", "prettier"], parser: "@typescript-eslint/parser", rules: { diff --git a/packages/jest/package.json b/packages/jest/package.json index ac8c06df..ebdec226 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -20,6 +20,9 @@ }, "extends": [ "@ordzaar" + ], + "ignorePatterns": [ + "*.js" ] }, "jest": { diff --git a/packages/jest/src/WaitForExpect.ts b/packages/jest/src/WaitForExpect.ts index 13e58946..8a6e16be 100644 --- a/packages/jest/src/WaitForExpect.ts +++ b/packages/jest/src/WaitForExpect.ts @@ -1,4 +1,3 @@ import waitForExpect from "wait-for-expect"; -// eslint-disable-next-line import/prefer-default-export export { waitForExpect }; diff --git a/packages/standard-linter/README.md b/packages/standard-linter/README.md index 3adfb084..dcc0f6be 100644 --- a/packages/standard-linter/README.md +++ b/packages/standard-linter/README.md @@ -8,12 +8,10 @@ Standard linter for TS projects that do not run with web frameworks. This module Lint rules are extended from these packages -| Package | Description | -| -------------------------------- | ----------------------------------------------------- | -| @typescript-eslint/parser | Rules parser for TypeScript. | -| eslint-config-airbnb-base | Rules defined by airbnb. | -| eslint-config-airbnb-typescript | Rules defined by airbnb for TypeScript without React. | -| eslint-plugin-simple-import-sort | Rules defined for simple import sorting. | -| prettier | Rules defined by prettier to have same code styles | -| eslint-plugin-unused-imports | Rules to auto remove unused import | -| eslint-plugin-check-file | Rules to enforce file name checking (off by default) | +| Package | Description | +| -------------------------------- | ---------------------------------------------------- | +| @typescript-eslint/parser | Rules parser for TypeScript. | +| eslint-plugin-simple-import-sort | Rules defined for simple import sorting. | +| prettier | Rules defined by prettier to have same code styles | +| eslint-plugin-unused-imports | Rules to auto remove unused import | +| eslint-plugin-check-file | Rules to enforce file name checking (off by default) | diff --git a/packages/standard-prettier/package.json b/packages/standard-prettier/package.json index b9f1fa21..0a87ba3e 100644 --- a/packages/standard-prettier/package.json +++ b/packages/standard-prettier/package.json @@ -8,8 +8,6 @@ "dependencies": { "@ordzaar/standard-typescript": "workspace:*", "eslint": "^8.57.1", - "eslint-config-airbnb": "^19.0.4", - "eslint-config-airbnb-typescript": "^18.0.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-simple-import-sort": "^12.1.1", diff --git a/packages/turbo/package.json b/packages/turbo/package.json index b6015b60..29aeff21 100644 --- a/packages/turbo/package.json +++ b/packages/turbo/package.json @@ -31,6 +31,9 @@ }, "extends": [ "@ordzaar" + ], + "ignorePatterns": [ + "*.js" ] }, "jest": { diff --git a/packages/turbo/src/PackageJson.ts b/packages/turbo/src/PackageJson.ts index 623c310c..61776399 100644 --- a/packages/turbo/src/PackageJson.ts +++ b/packages/turbo/src/PackageJson.ts @@ -3,7 +3,6 @@ import { readFileSync } from "node:fs"; /** * `package.json` represented as constructable Class. */ -// eslint-disable-next-line import/prefer-default-export export class PackageJson { private readonly json: { name: string; diff --git a/packages/turbo/src/TurboPlanCommand.ts b/packages/turbo/src/TurboPlanCommand.ts index 4daa45fd..3876f624 100644 --- a/packages/turbo/src/TurboPlanCommand.ts +++ b/packages/turbo/src/TurboPlanCommand.ts @@ -9,7 +9,6 @@ import { Turbo } from "./Turbo"; * You can use the output and loop through an array to run test individually via `turbo run test --filter=package` */ -// eslint-disable-next-line import/prefer-default-export export class TurboPlanCommand extends Command { static override paths = [[`plan`]]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b565c117..37b9c6d0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -214,12 +214,6 @@ importers: eslint: specifier: ^8.57.1 version: 8.57.1 - eslint-config-airbnb: - specifier: ^19.0.4 - version: 19.0.4(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1))(eslint-plugin-jsx-a11y@6.10.2(eslint@8.57.1))(eslint-plugin-react-hooks@5.1.0(eslint@8.57.1))(eslint-plugin-react@7.37.2(eslint@8.57.1))(eslint@8.57.1) - eslint-config-airbnb-typescript: - specifier: ^18.0.0 - version: 18.0.0(@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1))(eslint@8.57.1) eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@8.57.1) @@ -2626,9 +2620,6 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - confusing-browser-globals@1.0.11: - resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - connect@3.7.0: resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} engines: {node: '>= 0.10.0'} @@ -3016,30 +3007,6 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-airbnb-base@15.0.0: - resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} - engines: {node: ^10.12.0 || >=12.0.0} - peerDependencies: - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.2 - - eslint-config-airbnb-typescript@18.0.0: - resolution: {integrity: sha512-oc+Lxzgzsu8FQyFVa4QFaVKiitTYiiW3frB9KYW5OWdPrqFc7FzxgB20hP4cHMlr+MBzGcLl3jnCOVOydL9mIg==} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^7.0.0 - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - - eslint-config-airbnb@19.0.4: - resolution: {integrity: sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==} - engines: {node: ^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.3 - eslint-plugin-jsx-a11y: ^6.5.1 - eslint-plugin-react: ^7.28.0 - eslint-plugin-react-hooks: 5.1.0 - eslint-config-next@14.2.20: resolution: {integrity: sha512-gHBvp4RDd51DAaDco7KiWFy731EwcItkDtGUaZH1EUXEnHCzsVRjMceT+b8aThjMLjOScz6Q27MGlePASvK4Aw==} peerDependencies: @@ -8676,8 +8643,6 @@ snapshots: concat-map@0.0.1: {} - confusing-browser-globals@1.0.11: {} - connect@3.7.0: dependencies: debug: 2.6.9 @@ -9094,35 +9059,6 @@ snapshots: eslint: 8.57.1 semver: 7.6.3 - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1))(eslint@8.57.1): - dependencies: - confusing-browser-globals: 1.0.11 - eslint: 8.57.1 - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1) - object.assign: 4.1.5 - object.entries: 1.1.8 - semver: 6.3.1 - - eslint-config-airbnb-typescript@18.0.0(@typescript-eslint/eslint-plugin@8.19.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2))(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1))(eslint@8.57.1): - dependencies: - '@typescript-eslint/eslint-plugin': 8.19.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1)(typescript@5.7.2) - '@typescript-eslint/parser': 8.19.0(eslint@8.57.1)(typescript@5.7.2) - eslint: 8.57.1 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1))(eslint@8.57.1) - transitivePeerDependencies: - - eslint-plugin-import - - eslint-config-airbnb@19.0.4(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1))(eslint-plugin-jsx-a11y@6.10.2(eslint@8.57.1))(eslint-plugin-react-hooks@5.1.0(eslint@8.57.1))(eslint-plugin-react@7.37.2(eslint@8.57.1))(eslint@8.57.1): - dependencies: - eslint: 8.57.1 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1) - eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1) - eslint-plugin-react: 7.37.2(eslint@8.57.1) - eslint-plugin-react-hooks: 5.1.0(eslint@8.57.1) - object.assign: 4.1.5 - object.entries: 1.1.8 - eslint-config-next@14.2.20(eslint@8.57.1)(typescript@5.7.2): dependencies: '@next/eslint-plugin-next': 14.2.20 @@ -9182,16 +9118,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 8.19.0(eslint@8.57.1)(typescript@5.7.2) - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - transitivePeerDependencies: - - supports-color - eslint-plugin-check-file@2.8.0(eslint@8.57.1): dependencies: eslint: 8.57.1 @@ -9239,35 +9165,6 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint@8.57.1): - 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 - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.19.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint@8.57.1) - 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': 8.19.0(eslint@8.57.1)(typescript@5.7.2) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - eslint-plugin-jsx-a11y@6.10.2(eslint@8.57.1): dependencies: aria-query: 5.3.2