eslint-config-conventions 1.1.0 → 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.json CHANGED
@@ -144,7 +144,6 @@
144
144
  "prefer-regex-literals": ["error", { "disallowRedundantWrapping": true }],
145
145
  "quote-props": ["error", "as-needed"],
146
146
  "radix": "error",
147
- "require-await": "error",
148
147
  "yoda": ["error", "never"],
149
148
 
150
149
  "import/no-absolute-path": "error",
@@ -231,11 +230,8 @@
231
230
  ],
232
231
  "no-useless-constructor": "off",
233
232
  "@typescript-eslint/no-useless-constructor": "error",
234
- "require-await": "off",
235
- "@typescript-eslint/require-await": "error",
236
233
 
237
234
  "@typescript-eslint/adjacent-overload-signatures": "error",
238
- "@typescript-eslint/await-thenable": "error",
239
235
  "@typescript-eslint/array-type": [
240
236
  "error",
241
237
  { "default": "array-simple" }
@@ -292,7 +288,6 @@
292
288
  "@typescript-eslint/no-for-in-array": "error",
293
289
  "@typescript-eslint/no-invalid-void-type": "error",
294
290
  "@typescript-eslint/no-misused-new": "error",
295
- "@typescript-eslint/no-misused-promises": "error",
296
291
  "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
297
292
  "@typescript-eslint/no-non-null-assertion": "error",
298
293
  "@typescript-eslint/no-this-alias": [
@@ -10,10 +10,10 @@ jobs:
10
10
  lint:
11
11
  runs-on: 'ubuntu-latest'
12
12
  steps:
13
- - uses: 'actions/checkout@v2.4.0'
13
+ - uses: 'actions/checkout@v3.0.0'
14
14
 
15
15
  - name: 'Use Node.js'
16
- uses: 'actions/setup-node@v2.5.1'
16
+ uses: 'actions/setup-node@v3.1.0'
17
17
  with:
18
18
  node-version: 'lts/*'
19
19
  cache: 'npm'
@@ -8,13 +8,13 @@ jobs:
8
8
  release:
9
9
  runs-on: 'ubuntu-latest'
10
10
  steps:
11
- - uses: 'actions/checkout@v2.4.0'
11
+ - uses: 'actions/checkout@v3.0.0'
12
12
  with:
13
13
  fetch-depth: 0
14
14
  persist-credentials: false
15
15
 
16
16
  - name: 'Use Node.js'
17
- uses: 'actions/setup-node@v2.5.1'
17
+ uses: 'actions/setup-node@v3.1.0'
18
18
  with:
19
19
  node-version: 'lts/*'
20
20
  cache: 'npm'
@@ -10,10 +10,10 @@ jobs:
10
10
  test:
11
11
  runs-on: 'ubuntu-latest'
12
12
  steps:
13
- - uses: 'actions/checkout@v2.4.0'
13
+ - uses: 'actions/checkout@v3.0.0'
14
14
 
15
15
  - name: 'Use Node.js'
16
- uses: 'actions/setup-node@v2.5.1'
16
+ uses: 'actions/setup-node@v3.1.0'
17
17
  with:
18
18
  node-version: 'lts/*'
19
19
  cache: 'npm'
package/.taprc ADDED
@@ -0,0 +1,8 @@
1
+ ts: false
2
+ jsx: false
3
+ flow: false
4
+ check-coverage: true
5
+ coverage: true
6
+
7
+ test-ignore:
8
+ - 'test/fixtures'
package/README.md CHANGED
@@ -41,9 +41,9 @@ Here is an example, but use it only for reference, because your decisions regard
41
41
  ```sh
42
42
  npm install --save-dev \
43
43
  eslint@^8.9.0 \
44
- eslint-plugin-import@^2.25.4 \
44
+ eslint-plugin-import@^2.26.0 \
45
45
  eslint-plugin-promise@^6.0.0 \
46
- eslint-plugin-unicorn@^41.0.0 \
46
+ eslint-plugin-unicorn@^42.0.0 \
47
47
  eslint-config-conventions@latest
48
48
  ```
49
49
 
@@ -62,9 +62,9 @@ If you want to use **TypeScript**, you also need to install:
62
62
 
63
63
  ```sh
64
64
  npm install --save-dev \
65
- typescript@^4.4.0 \
66
- @typescript-eslint/eslint-plugin@^5.12.0 \
67
- @typescript-eslint/parser@^5.12.0
65
+ typescript@^4.6.0 \
66
+ @typescript-eslint/eslint-plugin@^5.18.0 \
67
+ @typescript-eslint/parser@^5.18.0
68
68
  ```
69
69
 
70
70
  Dependencies are:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-conventions",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "public": true,
5
5
  "description": "ESLint shareable config to enforce strict conventions and good code quality.",
6
6
  "author": "Divlo <contact@divlo.fr>",
@@ -34,7 +34,7 @@
34
34
  "lint:javascript": "eslint \"**/*.{js,jsx,ts,tsx}\" -c \"eslintrc.json\"",
35
35
  "lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
36
36
  "lint:staged": "lint-staged",
37
- "test": "tape \"test/**/*.js\"",
37
+ "test": "tap",
38
38
  "release": "semantic-release",
39
39
  "_postinstall": "husky install",
40
40
  "prepublishOnly": "pinst --disable",
@@ -42,29 +42,29 @@
42
42
  },
43
43
  "peerDependencies": {
44
44
  "eslint": "^8.9.0",
45
- "eslint-plugin-import": "^2.25.4",
45
+ "eslint-plugin-import": "^2.26.0",
46
46
  "eslint-plugin-promise": "^6.0.0",
47
- "eslint-plugin-unicorn": "^41.0.0"
47
+ "eslint-plugin-unicorn": "^42.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@commitlint/cli": "16.2.1",
50
+ "@commitlint/cli": "16.2.3",
51
51
  "@commitlint/config-conventional": "16.2.1",
52
- "editorconfig-checker": "4.0.2",
53
- "eslint": "8.9.0",
54
52
  "@types/eslint": "8.4.1",
55
- "eslint-plugin-import": "2.25.4",
53
+ "@types/tap": "15.0.6",
54
+ "@typescript-eslint/eslint-plugin": "5.18.0",
55
+ "@typescript-eslint/parser": "5.18.0",
56
+ "editorconfig-checker": "4.0.2",
57
+ "eslint": "8.12.0",
58
+ "eslint-plugin-import": "2.26.0",
56
59
  "eslint-plugin-promise": "6.0.0",
57
- "eslint-plugin-unicorn": "41.0.0",
58
- "typescript": "4.5.5",
59
- "@typescript-eslint/parser": "5.12.0",
60
- "@typescript-eslint/eslint-plugin": "5.12.0",
61
- "tape": "5.5.2",
60
+ "eslint-plugin-unicorn": "42.0.0",
62
61
  "husky": "7.0.4",
63
- "lint-staged": "12.3.4",
62
+ "lint-staged": "12.3.7",
64
63
  "markdownlint-cli": "0.31.1",
65
- "@types/tape": "4.13.2",
66
- "pinst": "2.1.6",
67
- "prettier": "2.5.1",
68
- "semantic-release": "19.0.2"
64
+ "pinst": "3.0.0",
65
+ "prettier": "2.6.2",
66
+ "semantic-release": "19.0.2",
67
+ "tap": "16.0.1",
68
+ "typescript": "4.6.3"
69
69
  }
70
70
  }
package/test/basic.js CHANGED
@@ -1,13 +1,12 @@
1
- const test = require('tape')
1
+ const tap = require('tap')
2
2
 
3
3
  const config = require('../index.js')
4
4
 
5
- test('test basic properties of config', function (t) {
5
+ tap.test('test basic properties of config', async (t) => {
6
6
  t.ok(isObject(config.parserOptions))
7
7
  t.ok(isObject(config.env))
8
8
  t.ok(isObject(config.rules))
9
9
  t.ok(isObject(config.overrides))
10
- t.end()
11
10
  })
12
11
 
13
12
  function isObject(object) {
@@ -1,5 +1,5 @@
1
1
  const { ESLint } = require('eslint')
2
- const test = require('tape')
2
+ const tap = require('tap')
3
3
 
4
4
  const eslint = new ESLint({
5
5
  ignore: false,
@@ -7,7 +7,7 @@ const eslint = new ESLint({
7
7
  overrideConfigFile: 'eslintrc.json'
8
8
  })
9
9
 
10
- test('ensure we validate correctly JavaScript files', async (t) => {
10
+ tap.test('ensure we validate correctly JavaScript files', async (t) => {
11
11
  const [noErrors] = await eslint.lintFiles(
12
12
  'test/fixtures/javascript-no-errors.js'
13
13
  )
@@ -16,10 +16,9 @@ test('ensure we validate correctly JavaScript files', async (t) => {
16
16
  )
17
17
  t.equal(noErrors.errorCount, 0)
18
18
  t.equal(withErrors.errorCount, 3)
19
- t.end()
20
19
  })
21
20
 
22
- test('ensure we validate correctly TypeScript files', async (t) => {
21
+ tap.test('ensure we validate correctly TypeScript files', async (t) => {
23
22
  const [noErrors] = await eslint.lintFiles(
24
23
  'test/fixtures/typescript-no-errors.ts'
25
24
  )
@@ -28,13 +27,11 @@ test('ensure we validate correctly TypeScript files', async (t) => {
28
27
  )
29
28
  t.equal(noErrors.errorCount, 0)
30
29
  t.equal(withErrors.errorCount, 3)
31
- t.end()
32
30
  })
33
31
 
34
- test('ensure we allow top-level await', async (t) => {
32
+ tap.test('ensure we allow top-level await', async (t) => {
35
33
  const [lintResult] = await eslint.lintFiles(
36
34
  'test/fixtures/top-level-await.mjs'
37
35
  )
38
36
  t.equal(lintResult.errorCount, 0)
39
- t.end()
40
37
  })