eslint-config-seek 8.0.0 → 10.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 +10 -5
- package/.github/workflows/release.yml +4 -0
- package/CHANGELOG.md +47 -0
- package/package.json +14 -12
package/.eslintrc.js
CHANGED
|
@@ -70,7 +70,10 @@ const baseRules = {
|
|
|
70
70
|
'prefer-const': ERROR,
|
|
71
71
|
'prefer-spread': ERROR,
|
|
72
72
|
'prefer-template': ERROR,
|
|
73
|
-
|
|
73
|
+
// Allow devs to choose between performance and richer stack traces
|
|
74
|
+
// https://eslint.org/docs/rules/no-return-await#when-not-to-use-it
|
|
75
|
+
// https://github.com/goldbergyoni/nodebestpractices/blob/master@%7B2022-01-01T00:00:00Z%7D/sections/errorhandling/returningpromises.md
|
|
76
|
+
'no-return-await': OFF,
|
|
74
77
|
};
|
|
75
78
|
|
|
76
79
|
const reactRules = {
|
|
@@ -85,10 +88,13 @@ const reactRules = {
|
|
|
85
88
|
};
|
|
86
89
|
|
|
87
90
|
const baseConfig = {
|
|
88
|
-
parser: 'babel-
|
|
91
|
+
parser: '@babel/eslint-parser',
|
|
89
92
|
parserOptions: {
|
|
93
|
+
babelOptions: {
|
|
94
|
+
presets: ['@babel/preset-react'],
|
|
95
|
+
},
|
|
96
|
+
requireConfigFile: false,
|
|
90
97
|
sourceType: 'module',
|
|
91
|
-
ecmaFeatures: { jsx: true },
|
|
92
98
|
},
|
|
93
99
|
root: true,
|
|
94
100
|
env: {
|
|
@@ -118,7 +124,7 @@ const baseConfig = {
|
|
|
118
124
|
extends: [
|
|
119
125
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
120
126
|
'plugin:@typescript-eslint/recommended',
|
|
121
|
-
'prettier
|
|
127
|
+
'prettier',
|
|
122
128
|
],
|
|
123
129
|
rules: {
|
|
124
130
|
'@typescript-eslint/no-unused-expressions': ERROR,
|
|
@@ -137,7 +143,6 @@ const baseConfig = {
|
|
|
137
143
|
ERROR,
|
|
138
144
|
{ ignoreParameters: true },
|
|
139
145
|
],
|
|
140
|
-
'@typescript-eslint/explicit-module-boundary-types': OFF,
|
|
141
146
|
// prefer TypeScript exhaustiveness checking
|
|
142
147
|
// https://www.typescriptlang.org/docs/handbook/advanced-types.html#exhaustiveness-checking
|
|
143
148
|
'default-case': OFF,
|
|
@@ -15,6 +15,10 @@ jobs:
|
|
|
15
15
|
steps:
|
|
16
16
|
- name: Check out repo
|
|
17
17
|
uses: actions/checkout@main
|
|
18
|
+
with:
|
|
19
|
+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
token: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
|
|
18
22
|
|
|
19
23
|
- name: Set up Node.js 16.x
|
|
20
24
|
uses: actions/setup-node@main
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# eslint-config-seek
|
|
2
2
|
|
|
3
|
+
## 10.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- eslint-plugin-jest 27 ([#79](https://github.com/seek-oss/eslint-config-seek/pull/79))
|
|
8
|
+
|
|
9
|
+
This major release includes breaking changes. See the [release note](https://github.com/jest-community/eslint-plugin-jest/releases/tag/v27.0.0) for more information.
|
|
10
|
+
|
|
11
|
+
The `jest/no-alias-methods` rule is now [enforced](https://github.com/jest-community/eslint-plugin-jest/pull/1221) to discourage usage of alias methods that will be [removed in Jest 30](https://github.com/facebook/jest/issues/13164).
|
|
12
|
+
|
|
13
|
+
```diff
|
|
14
|
+
- .toBeCalled()
|
|
15
|
+
+ .toHaveBeenCalled()
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 9.0.0
|
|
19
|
+
|
|
20
|
+
### Major Changes
|
|
21
|
+
|
|
22
|
+
- Support ESLint 8.x ([#73](https://github.com/seek-oss/eslint-config-seek/pull/73))
|
|
23
|
+
|
|
24
|
+
We've upgraded the parsers and plugins bundled in `eslint-config-seek` for ESLint 8.x compatibility. Some linting rules have changed and may require manual triage. In particular, we've applied the following major upgrades:
|
|
25
|
+
|
|
26
|
+
- [TypeScript ESLint v5](https://github.com/typescript-eslint/typescript-eslint/releases/tag/v5.0.0)
|
|
27
|
+
|
|
28
|
+
This includes changes to the recommended rule set.
|
|
29
|
+
|
|
30
|
+
- [`babel-eslint`](https://www.npmjs.com/package/babel-eslint) → [`@babel/eslint-parser`](https://www.npmjs.com/package/@babel/eslint-parser)
|
|
31
|
+
|
|
32
|
+
This resolves the following installation warning:
|
|
33
|
+
|
|
34
|
+
```console
|
|
35
|
+
babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- [`eslint-config-prettier` v8](https://github.com/prettier/eslint-config-prettier/blob/HEAD/CHANGELOG.md?rgh-link-date=2021-10-18T05%3A10%3A39Z#version-800-2021-02-21)
|
|
39
|
+
|
|
40
|
+
This unifies on a single `prettier` config.
|
|
41
|
+
|
|
42
|
+
[`eslint-plugin-cypress`](https://github.com/cypress-io/eslint-plugin-cypress/issues/89) is currently incompatible with ESLint 8.x. Projects that utilise Cypress should remain on ESLint 7.x.
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- Turn off [`no-return-await`](https://eslint.org/docs/rules/no-return-await) ([#74](https://github.com/seek-oss/eslint-config-seek/pull/74))
|
|
47
|
+
|
|
48
|
+
`return await` produces [richer stack traces with a marginal performance penalty](https://github.com/goldbergyoni/nodebestpractices/blob/master@%7B2022-01-01T00:00:00Z%7D/sections/errorhandling/returningpromises.md) in recent Node.js versions. This tradeoff is now left to individual consumers to weigh up and optionally enforce.
|
|
49
|
+
|
|
3
50
|
## 8.0.0
|
|
4
51
|
|
|
5
52
|
### Major Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-seek",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "ESLint configuration used by SEEK",
|
|
5
5
|
"main": ".eslintrc.js",
|
|
6
6
|
"repository": {
|
|
@@ -19,22 +19,24 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://github.com/seek-oss/eslint-config-seek#readme",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"babel-
|
|
25
|
-
"eslint-
|
|
26
|
-
"eslint
|
|
27
|
-
"eslint-
|
|
28
|
-
"eslint-
|
|
29
|
-
"eslint-plugin-
|
|
30
|
-
"eslint-plugin-
|
|
31
|
-
"eslint-plugin-
|
|
22
|
+
"@babel/core": "^7.17.8",
|
|
23
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
24
|
+
"@babel/preset-react": "^7.16.7",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^5.16.0",
|
|
26
|
+
"@typescript-eslint/parser": "^5.16.0",
|
|
27
|
+
"eslint-config-prettier": "^8.5.0",
|
|
28
|
+
"eslint-import-resolver-node": "^0.3.6",
|
|
29
|
+
"eslint-plugin-cypress": "^2.12.1",
|
|
30
|
+
"eslint-plugin-import": "^2.25.4",
|
|
31
|
+
"eslint-plugin-jest": "^27.0.1",
|
|
32
|
+
"eslint-plugin-react": "^7.29.4",
|
|
33
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
32
34
|
"find-root": "^1.1.0"
|
|
33
35
|
},
|
|
34
36
|
"devDependencies": {
|
|
35
37
|
"@changesets/cli": "2.17.0",
|
|
36
38
|
"@changesets/get-github-info": "0.5.0",
|
|
37
|
-
"eslint": "
|
|
39
|
+
"eslint": "8.11.0",
|
|
38
40
|
"prettier": "2.4.1",
|
|
39
41
|
"typescript": "^4.1.2"
|
|
40
42
|
},
|