Skip to content

Commit

Permalink
chore: Remove linting from integration-test project
Browse files Browse the repository at this point in the history
Version 2.23.2 of `eslint-plugin-import` prefers to `import` statements
above `import type`.

We do not have a lockfile for the `integration-test` project because:

> Ignore package-lock.json to avoid the following error when reinstalling dependencies:
> npm ERR! notarget No matching version found for eslint-plugin-custom-rules@1.0.0.
> This is because we're installing @guardian/cdk from file, which is in turn installing eslint-plugin-custom-rules from file.

Combined this with the version of `eslint-plugin-import` is defined with `^`,
linting is non-deterministic* and we only saw an import order linting error locally
after removing `node_modules`.

There are a couple of ways to improve this:
  - Work out how to use a lockfile in the integration-test
  - Remove linting and hope the other dependencies using `^` versions are OK

This change removes linting, with the justification that:
  - This project is never consumed by anyone
  - This project doesn't run anywhere
  - This project doesn't get updated too often
  - Understanding the original lockfile issues is a time sink

See:
  - import-js/eslint-plugin-import#2021
  - #564

* Well, the entire build of integration-test is non-deterministic!
  • Loading branch information
akash1810 committed May 19, 2021
1 parent 9b9a91b commit 9da786b
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 43 deletions.
4 changes: 0 additions & 4 deletions integration-test/.eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions integration-test/.eslintrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions integration-test/.prettierrc

This file was deleted.

10 changes: 0 additions & 10 deletions integration-test/package.json
Expand Up @@ -12,24 +12,14 @@
"test:dev": "jest --runInBand --detectOpenHandles --watch",
"format": "prettier --write \"{src,bin}/**/*.ts\"",
"cdk": "cdk",
"lint": "eslint src/** bin/** --ext .ts --no-error-on-unmatched-pattern",
"generate": "cdk synth --path-metadata false --version-reporting false"
},
"devDependencies": {
"@guardian/eslint-config-typescript": "^0.5.0",
"@types/jest": "^26.0.22",
"@types/node": "15.0.2",
"@typescript-eslint/eslint-plugin": "^4.19.0",
"@typescript-eslint/parser": "^4.19.0",
"aws-cdk": "1.103.0",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-custom-rules": "file:../eslint",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.3.1",
"jest": "^26.4.2",
"prettier": "^2.2.1",
"ts-jest": "^26.5.4",
"ts-node": "^9.1.1",
"typescript": "~4.2.3"
Expand Down
1 change: 0 additions & 1 deletion integration-test/script/ci
Expand Up @@ -8,6 +8,5 @@ set -e
npm install --no-package-lock

npm run build
npm run lint
npm run test
npm run generate
5 changes: 0 additions & 5 deletions integration-test/script/lint

This file was deleted.

0 comments on commit 9da786b

Please sign in to comment.