@guardian/eslint-config 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -8,10 +8,7 @@ module.exports = {
8
8
  'eslint:recommended',
9
9
  'plugin:import/errors',
10
10
  'plugin:import/warnings',
11
-
12
- // this works for all possible configs in v8
13
- // https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21
14
- 'plugin:prettier/recommended',
11
+ 'prettier',
15
12
  ],
16
13
  plugins: ['eslint-comments'],
17
14
  rules: {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @guardian/eslint-config
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 0f0888d: _tl;dr_
8
+
9
+ - linting for conformance with our `prettier` config is slow
10
+ - to speed up linting, we will stop doing that
11
+ - you should use `prettier` directly
12
+
13
+ ### Before
14
+
15
+ We extended `plugin:prettier/recommended` which
16
+
17
+ 1. used `eslint-config-prettier` to disable any white-space formatting rules that would conflict with our prettier config
18
+ 2. used `eslint-plugin-prettier` to lint for formatting errors that did not match our prettier config
19
+
20
+ This is quite expensive, and although it means you could use `--fix` to apply prettier, it's not as fast as using prettier directly.
21
+
22
+ ### After
23
+
24
+ We still use `eslint-config-prettier` to avoid conflicts with our `prettier` config, but we no longer lint for errors (and therefore also don't fix them).
25
+
26
+ ### Recommendations
27
+
28
+ Use `prettier` directly, e.g.
29
+
30
+ - via [editor integration](https://prettier.io/docs/en/editors.html)
31
+ - via a [pre-commit hook](https://prettier.io/docs/en/precommit.html)
32
+
33
+ If you prefer the way this used to work, add the [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) manually to your ESLint config.
34
+
3
35
  ## 1.0.2
4
36
 
5
37
  ### Patch Changes
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@guardian/eslint-config",
3
- "version": "1.0.2",
3
+ "version": "2.0.0",
4
4
  "description": "ESLint config for Guardian JavaScript projects",
5
- "homepage": "https://github.com/guardian/csnx/tree/main/libs/eslint-config#readme",
5
+ "homepage": "https://github.com/guardian/csnx/tree/main/packages/eslint-config#readme",
6
6
  "bugs": {
7
7
  "url": "https://github.com/guardian/csnx/issues"
8
8
  },
@@ -15,8 +15,7 @@
15
15
  "dependencies": {
16
16
  "eslint-config-prettier": "8.5.0",
17
17
  "eslint-plugin-eslint-comments": "3.2.0",
18
- "eslint-plugin-import": "2.26.0",
19
- "eslint-plugin-prettier": "4.0.0"
18
+ "eslint-plugin-import": "2.26.0"
20
19
  },
21
20
  "peerDependencies": {
22
21
  "eslint": "^8.0.0"
@@ -25,5 +24,5 @@
25
24
  "access": "public"
26
25
  },
27
26
  "readme": "ERROR: No README data found!",
28
- "_id": "@guardian/eslint-config@1.0.2"
27
+ "_id": "@guardian/eslint-config@2.0.0"
29
28
  }