@aarongoldenthal/eslint-config-standard 24.0.1 → 26.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 - 2023 Aaron Goldenthal
3
+ Copyright (c) 2019 - 2024 Aaron Goldenthal
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -8,11 +8,11 @@ for `eslint`, `@eslint-community/eslint-plugin-eslint-comments` (formerly
8
8
  `eslint-plugin-n` (formerly `eslint-plugin-node`), `eslint-plugin-playwright`,
9
9
  `eslint-plugin-promise`, `eslint-plugin-sonarjs`, `eslint-plugin-unicorn`, and
10
10
  `eslint-plugin-vitest`. This package defines all required configurations as
11
- `peerDependencies` so they are installed and do not have to be defined in each
11
+ `peerDependencies` so they're installed and don't have to be defined in each
12
12
  project.
13
13
 
14
14
  Per recommended best practices, the following configurations include `overrides`
15
- so they are only applicable to a subset of files:
15
+ so they're only applicable to a subset of files:
16
16
 
17
17
  - `jest-config`, `vitest-config`: applicable to files matching
18
18
  `['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)']`,
@@ -39,7 +39,7 @@ configure .eslintrc.json with this configuration:
39
39
  }
40
40
  ```
41
41
 
42
- There is also a `recommended-vitest` configuration that is the same as the
42
+ There is also a `recommended-vitest` configuration that's the same as the
43
43
  `recommended` config, but includes the `vitest-config` instead of the
44
44
  `jest-config`, and can be configured with:
45
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aarongoldenthal/eslint-config-standard",
3
- "version": "24.0.1",
3
+ "version": "26.0.0",
4
4
  "description": "Standard ESLint configuration settings",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,23 +35,23 @@
35
35
  },
36
36
  "homepage": "https://gitlab.com/gitlab-ci-utils/eslint-config-standard",
37
37
  "devDependencies": {
38
- "eslint": "8.54.0",
38
+ "eslint": "8.56.0",
39
39
  "jest": "29.7.0",
40
40
  "jest-junit": "16.0.0",
41
- "markdownlint-cli2": "0.11.0",
42
- "prettier": "3.1.0"
41
+ "markdownlint-cli2": "0.12.1",
42
+ "prettier": "3.2.5"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@eslint-community/eslint-plugin-eslint-comments": "4.1.0",
46
46
  "eslint": "^8.27.0",
47
- "eslint-config-prettier": "9.0.0",
48
- "eslint-plugin-jest": "27.6.0",
49
- "eslint-plugin-jsdoc": "46.9.0",
50
- "eslint-plugin-n": "16.3.1",
51
- "eslint-plugin-playwright": "0.18.0",
47
+ "eslint-config-prettier": "9.1.0",
48
+ "eslint-plugin-jest": "27.9.0",
49
+ "eslint-plugin-jsdoc": "48.1.0",
50
+ "eslint-plugin-n": "16.6.2",
51
+ "eslint-plugin-playwright": "1.3.0",
52
52
  "eslint-plugin-promise": "6.1.1",
53
- "eslint-plugin-sonarjs": "0.23.0",
54
- "eslint-plugin-unicorn": "49.0.0",
55
- "eslint-plugin-vitest": "0.3.10"
53
+ "eslint-plugin-sonarjs": "0.24.0",
54
+ "eslint-plugin-unicorn": "51.0.1",
55
+ "eslint-plugin-vitest": "0.3.22"
56
56
  }
57
57
  }
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ const maxExpects = 5;
4
+
3
5
  module.exports = {
4
6
  overrides: [
5
7
  {
@@ -10,31 +12,48 @@ module.exports = {
10
12
  plugins: ['playwright'],
11
13
  rules: {
12
14
  'playwright/expect-expect': 'error',
15
+ 'playwright/max-expects': ['error', { max: maxExpects }],
13
16
  'playwright/max-nested-describe': 'error',
14
17
  'playwright/missing-playwright-await': 'error',
18
+ 'playwright/no-commented-out-tests': 'error',
19
+ 'playwright/no-conditional-expect': 'error',
15
20
  'playwright/no-conditional-in-test': 'error',
21
+ 'playwright/no-duplicate-hooks': 'error',
16
22
  'playwright/no-element-handle': 'error',
17
23
  'playwright/no-eval': 'error',
18
24
  'playwright/no-focused-test': 'error',
19
25
  'playwright/no-force-option': 'error',
26
+ 'playwright/no-get-by-title': 'error',
27
+ 'playwright/no-hooks': 'off',
20
28
  'playwright/no-nested-step': 'error',
21
29
  'playwright/no-networkidle': 'error',
22
30
  'playwright/no-nth-methods': 'error',
23
31
  'playwright/no-page-pause': 'error',
24
32
  'playwright/no-raw-locators': 'error',
33
+ 'playwright/no-restricted-matchers': 'off',
25
34
  'playwright/no-skipped-test': 'error',
35
+ 'playwright/no-standalone-expect': 'error',
36
+ 'playwright/no-unsafe-references': 'error',
26
37
  'playwright/no-useless-await': 'error',
27
38
  'playwright/no-useless-not': 'error',
39
+ 'playwright/no-wait-for-selector': 'error',
28
40
  'playwright/no-wait-for-timeout': 'error',
41
+ 'playwright/prefer-comparison-matcher': 'error',
42
+ 'playwright/prefer-equality-matcher': 'error',
43
+ 'playwright/prefer-hooks-in-order': 'error',
44
+ 'playwright/prefer-hooks-on-top': 'error',
29
45
  'playwright/prefer-lowercase-title': 'error',
30
46
  'playwright/prefer-strict-equal': 'error',
31
47
  'playwright/prefer-to-be': 'error',
32
48
  'playwright/prefer-to-contain': 'error',
49
+ 'playwright/prefer-to-have-count': 'error',
33
50
  'playwright/prefer-to-have-length': 'error',
34
51
  'playwright/prefer-web-first-assertions': 'error',
52
+ 'playwright/require-hook': 'error',
35
53
  'playwright/require-soft-assertions': 'off',
36
54
  'playwright/require-top-level-describe': 'error',
37
- 'playwright/valid-expect': 'error'
55
+ 'playwright/valid-expect': 'error',
56
+ 'playwright/valid-title': 'error'
38
57
  }
39
58
  }
40
59
  ]
package/unicorn-config.js CHANGED
@@ -15,7 +15,7 @@ module.exports = {
15
15
  rules: {
16
16
  'unicorn/better-regex': 'error', // Recommended
17
17
  'unicorn/catch-error-name': 'error', // Recommended
18
- 'unicorn/consistent-destructuring': 'error', // Recommended
18
+ 'unicorn/consistent-destructuring': 'error',
19
19
  'unicorn/consistent-function-scoping': 'error', // Recommended
20
20
  'unicorn/custom-error-definition': 'error',
21
21
  'unicorn/empty-brace-spaces': 'off', // Recommended, Prettier
@@ -54,6 +54,7 @@ module.exports = {
54
54
  'unicorn/no-this-assignment': 'error', // Recommended
55
55
  'unicorn/no-typeof-undefined': 'error', // Recommended
56
56
  'unicorn/no-unnecessary-await': 'error', // Recommended
57
+ 'unicorn/no-unnecessary-polyfills': 'error', // Recommended
57
58
  'unicorn/no-unreadable-array-destructuring': 'error', // Recommended
58
59
  'unicorn/no-unreadable-iife': 'error', // Recommended
59
60
  'unicorn/no-unused-properties': 'error',