@guardian/eslint-config 1.0.2 → 2.0.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @guardian/eslint-config
2
2
 
3
+ ## 2.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - f04d503: Update @rollup/plugin-node-resolve to v14
8
+
9
+ ## 2.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 8f3ed43: Configures `import/no-cycle` to ignore external modules, decreasing the time it takes to lint a project.
14
+
15
+ ## 2.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - 0f0888d: _tl;dr_
20
+
21
+ - linting for conformance with our `prettier` config is slow
22
+ - to speed up linting, we will stop doing that
23
+ - you should use `prettier` directly
24
+
25
+ ### Before
26
+
27
+ We extended `plugin:prettier/recommended` which
28
+
29
+ 1. used `eslint-config-prettier` to disable any white-space formatting rules that would conflict with our prettier config
30
+ 2. used `eslint-plugin-prettier` to lint for formatting errors that did not match our prettier config
31
+
32
+ This is quite expensive, and although it means you could use `--fix` to apply prettier, it's not as fast as using prettier directly.
33
+
34
+ ### After
35
+
36
+ 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).
37
+
38
+ ### Recommendations
39
+
40
+ Your project should handle `prettier` formatting in another way, e.g.
41
+
42
+ - via [editor integration](https://prettier.io/docs/en/editors.html)
43
+ - via a [pre-commit hook](https://prettier.io/docs/en/precommit.html)
44
+
45
+ If you prefer the way this used to work (applying `prettier` formatting as part of linting), add the [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) manually to your ESLint config.
46
+
3
47
  ## 1.0.2
4
48
 
5
49
  ### Patch Changes
@@ -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: {
@@ -78,6 +75,6 @@ module.exports = {
78
75
  ],
79
76
 
80
77
  // prevent circular dependencies
81
- 'import/no-cycle': 2,
78
+ 'import/no-cycle': ['error', { ignoreExternal: true }],
82
79
  },
83
80
  };
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.2",
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/libs/@guardian/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.2"
29
28
  }