@aarongoldenthal/eslint-config-standard 20.1.0 → 21.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/README.md CHANGED
@@ -2,21 +2,34 @@
2
2
 
3
3
  ## Summary
4
4
 
5
- Custom standard ESLint configuration for all projects. Includes configurations for `eslint`, `eslint-plugin-jest`, `eslint-plugin-jsdoc`, `eslint-plugin-n` (formerly `eslint-plugin-node`), `eslint-plugin-playwright`, `eslint-plugin-promise`, `eslint-plugin-sonarjs`, and `eslint-plugin-unicorn`. This package defines all required configurations as `dependencies` so they are installed and do not have to be defined in each project.
5
+ Custom standard ESLint configuration for all projects. Includes configurations
6
+ for `eslint`, `@eslint-community/eslint-plugin-eslint-comments` (formerly
7
+ `eslint-plugin-eslint-comments`), `eslint-plugin-jest`, `eslint-plugin-jsdoc`,
8
+ `eslint-plugin-n` (formerly `eslint-plugin-node`), `eslint-plugin-playwright`,
9
+ `eslint-plugin-promise`, `eslint-plugin-sonarjs`, and `eslint-plugin-unicorn`.
10
+ This package defines all required configurations as `dependencies` so they are
11
+ installed and do not have to be defined in each project.
6
12
 
7
- Per recommended best practices, the following configurations include `overrides` so they are only applicable to a subset of files:
13
+ Per recommended best practices, the following configurations include `overrides`
14
+ so they are only applicable to a subset of files:
8
15
 
9
16
  - `jest-config`: applicable to files matching `['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)']`,
10
17
  which is the [default filter for Jest test files](https://jestjs.io/docs/configuration#testmatch-arraystring).
11
- - `playwright-config`: applicable to files matching `['**/*.pwtest.[jt]s']`, which differentiates them from Jest test files.
18
+ - `playwright-config`: applicable to files matching `['**/*.pwtest.[jt]s']`,
19
+ which differentiates them from Jest test files.
12
20
 
13
- The configuration as-defined includes a number of formatting rules. The `eslint-config-prettier` package is included as well, and can be added to the config if `prettier` is also being used so it takes priority for formatting.
21
+ The configuration as-defined includes a number of formatting rules. The
22
+ `eslint-config-prettier` package is included as well, and can be added to the
23
+ config if `prettier` is also being used so it takes priority for formatting.
14
24
 
15
- There is also an `esm-config` included with overrides for projects using ES modules instead of Common JS modules.
25
+ There is also an `esm-config` included with overrides for projects using ES
26
+ modules instead of Common JS modules.
16
27
 
17
28
  ### Usage
18
29
 
19
- There is a `recommended` configuration with all plugin configurations enabled except `esm-config` (but including `prettier`). To configure .eslintrc.json with this configuration:
30
+ There is a `recommended` configuration with all plugin configurations enabled
31
+ except `esm-config` (but including `prettier`). To configure .eslintrc.json
32
+ with this configuration:
20
33
 
21
34
  ```json
22
35
  {
@@ -24,11 +37,13 @@ There is a `recommended` configuration with all plugin configurations enabled ex
24
37
  }
25
38
  ```
26
39
 
27
- To configure .eslintrc.json with individual plugins, use the appropriate subset of the options below:
40
+ To configure .eslintrc.json with individual plugins, use the appropriate subset
41
+ of the options below:
28
42
 
29
43
  ```json
30
44
  {
31
45
  "extends": [
46
+ "@aarongoldenthal/eslint-config-standard/eslint-comments-config.js",
32
47
  "@aarongoldenthal/eslint-config-standard/jest-config",
33
48
  "@aarongoldenthal/eslint-config-standard/jsdoc-config",
34
49
  "@aarongoldenthal/eslint-config-standard/node-config",
@@ -45,6 +60,10 @@ To configure .eslintrc.json with individual plugins, use the appropriate subset
45
60
 
46
61
  Notes:
47
62
 
48
- - If used, the `@aarongoldenthal/eslint-config-standard` config should be included after any other `@aarongoldenthal/eslint-config-standard/*` configurations except `esm-config` so those settings take precedence.
49
- - If used, the `esm-config` should be configured after all functional rules to ensure the overridden settings take precedence.
50
- - If used, the `prettier` should be included last to take priority in disabling the applicable rules from all other configurations.
63
+ - If used, the `@aarongoldenthal/eslint-config-standard` config should be
64
+ included after any other `@aarongoldenthal/eslint-config-standard/*`
65
+ configurations except `esm-config` so those settings take precedence.
66
+ - If used, the `esm-config` should be configured after all functional rules
67
+ to ensure the overridden settings take precedence.
68
+ - If used, the `prettier` should be included last to take priority in disabling
69
+ the applicable rules from all other configurations.
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ plugins: ['@eslint-community/eslint-comments'],
5
+ rules: {
6
+ '@eslint-community/eslint-comments/disable-enable-pair': [
7
+ 'error',
8
+ { allowWholeFile: true }
9
+ ],
10
+ '@eslint-community/eslint-comments/no-aggregating-enable': 'error',
11
+ '@eslint-community/eslint-comments/no-duplicate-disable': 'error',
12
+ '@eslint-community/eslint-comments/no-unlimited-disable': 'error',
13
+ '@eslint-community/eslint-comments/no-unused-disable': 'error',
14
+ '@eslint-community/eslint-comments/no-unused-enable': 'error',
15
+ '@eslint-community/eslint-comments/no-use': [
16
+ 'error',
17
+ {
18
+ allow: [
19
+ 'eslint-disable',
20
+ 'eslint-disable-line',
21
+ 'eslint-disable-next-line',
22
+ 'eslint-enable'
23
+ ]
24
+ }
25
+ ],
26
+ '@eslint-community/eslint-comments/require-description': 'error'
27
+ }
28
+ };
package/jsdoc-config.js CHANGED
@@ -35,6 +35,7 @@ module.exports = {
35
35
  'jsdoc/check-values': 'error', // Recommended
36
36
  'jsdoc/empty-tags': 'error', // Recommended
37
37
  'jsdoc/implements-on-classes': 'error', // Recommended
38
+ 'jsdoc/informative-docs': 'error',
38
39
  'jsdoc/match-description': 'error',
39
40
  'jsdoc/multiline-blocks': 'error', // Recommended
40
41
  'jsdoc/newline-after-description': 'error', // Recommended
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aarongoldenthal/eslint-config-standard",
3
- "version": "20.1.0",
3
+ "version": "21.0.0",
4
4
  "description": "Standard ESLint configuration settings",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,21 +35,22 @@
35
35
  },
36
36
  "homepage": "https://gitlab.com/gitlab-ci-utils/eslint-config-standard",
37
37
  "dependencies": {
38
- "eslint-config-prettier": "8.7.0",
38
+ "@eslint-community/eslint-plugin-eslint-comments": "3.2.1",
39
+ "eslint-config-prettier": "8.8.0",
39
40
  "eslint-plugin-jest": "27.2.1",
40
- "eslint-plugin-jsdoc": "40.0.2",
41
- "eslint-plugin-n": "15.6.1",
41
+ "eslint-plugin-jsdoc": "41.1.1",
42
+ "eslint-plugin-n": "15.7.0",
42
43
  "eslint-plugin-playwright": "0.12.0",
43
44
  "eslint-plugin-promise": "6.1.1",
44
- "eslint-plugin-sonarjs": "0.18.0",
45
+ "eslint-plugin-sonarjs": "0.19.0",
45
46
  "eslint-plugin-unicorn": "46.0.0"
46
47
  },
47
48
  "devDependencies": {
48
- "eslint": "^8.36.0",
49
+ "eslint": "^8.38.0",
49
50
  "jest": "^29.5.0",
50
51
  "jest-junit": "^15.0.0",
51
52
  "markdownlint-cli": "^0.33.0",
52
- "prettier": "^2.8.4"
53
+ "prettier": "^2.8.7"
53
54
  },
54
55
  "peerDependencies": {
55
56
  "eslint": "^8.27.0"
package/recommended.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  module.exports = {
4
4
  extends: [
5
+ './eslint-comments-config.js',
5
6
  './jest-config.js',
6
7
  './jsdoc-config.js',
7
8
  './node-config.js',