eslint-plugin-primer-react 7.1.0-rc.8f87c4b → 8.0.0-rc.0673cce
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/.github/workflows/add-to-inbox.yml +2 -2
- package/.github/workflows/ci.yml +3 -3
- package/.github/workflows/release.yml +1 -1
- package/.github/workflows/release_canary.yml +1 -1
- package/.github/workflows/release_candidate.yml +1 -1
- package/.markdownlint-cli2.cjs +2 -2
- package/.nvmrc +1 -1
- package/CHANGELOG.md +7 -3
- package/eslint.config.js +54 -0
- package/package-lock.json +3843 -8860
- package/package.json +19 -10
- package/src/rules/__tests__/a11y-explicit-heading.test.js +5 -3
- package/src/rules/__tests__/a11y-link-in-text-block.test.js +5 -3
- package/src/rules/__tests__/a11y-no-duplicate-form-labels.test.js +5 -9
- package/src/rules/__tests__/a11y-no-title-usage.test.js +5 -3
- package/src/rules/__tests__/a11y-remove-disable-tooltip.test.js +5 -3
- package/src/rules/__tests__/a11y-tooltip-interactive-trigger.test.js +5 -3
- package/src/rules/__tests__/a11y-use-accessible-tooltip.test.js +5 -3
- package/src/rules/__tests__/direct-slot-children.test.js +5 -3
- package/src/rules/__tests__/enforce-button-for-link-with-nohref.test.js +5 -3
- package/src/rules/__tests__/enforce-css-module-identifier-casing.test.js +5 -3
- package/src/rules/__tests__/new-color-css-vars.test.js +5 -3
- package/src/rules/__tests__/no-deprecated-entrypoints.test.js +5 -3
- package/src/rules/__tests__/no-deprecated-experimental-components.test.js +5 -3
- package/src/rules/__tests__/no-deprecated-props.test.js +5 -3
- package/src/rules/__tests__/no-system-props.test.js +5 -4
- package/src/rules/__tests__/no-unnecessary-components.test.js +6 -4
- package/src/rules/__tests__/no-wildcard-imports.test.js +6 -43
- package/src/rules/__tests__/prefer-action-list-item-onselect.test.js +6 -4
- package/src/rules/__tests__/use-deprecated-from-deprecated.test.js +5 -3
- package/src/rules/no-deprecated-experimental-components.js +0 -1
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -39
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
PROJECT_ID: 4503
|
|
13
13
|
steps:
|
|
14
14
|
- id: get-primer-access-token
|
|
15
|
-
uses: actions/create-github-app-token@
|
|
15
|
+
uses: actions/create-github-app-token@v2
|
|
16
16
|
with:
|
|
17
17
|
app-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_ID }}
|
|
18
18
|
private-key: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_PRIVATE_KEY }}
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
env:
|
|
23
23
|
GH_TOKEN: ${{ steps.get-primer-access-token.outputs.token }}
|
|
24
24
|
- id: get-github-access-token
|
|
25
|
-
uses: actions/create-github-app-token@
|
|
25
|
+
uses: actions/create-github-app-token@v2
|
|
26
26
|
with:
|
|
27
27
|
app-id: ${{ vars.PRIMER_ISSUE_TRIAGE_APP_ID_FOR_GITHUB }}
|
|
28
28
|
private-key: ${{ secrets.PRIMER_ISSUE_TRIAGE_APP_PRIVATE_KEY_FOR_GITHUB }}
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
- name: Use Node.js
|
|
14
14
|
uses: actions/setup-node@v4
|
|
15
15
|
with:
|
|
16
|
-
node-version:
|
|
16
|
+
node-version: 20
|
|
17
17
|
cache: 'npm'
|
|
18
18
|
- run: npm ci
|
|
19
19
|
- run: npm run format:check
|
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
- name: Use Node.js
|
|
26
26
|
uses: actions/setup-node@v4
|
|
27
27
|
with:
|
|
28
|
-
node-version:
|
|
28
|
+
node-version: 20
|
|
29
29
|
cache: 'npm'
|
|
30
30
|
- run: npm ci
|
|
31
31
|
- run: npm test
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
- name: Use Node.js
|
|
38
38
|
uses: actions/setup-node@v4
|
|
39
39
|
with:
|
|
40
|
-
node-version:
|
|
40
|
+
node-version: 20
|
|
41
41
|
cache: 'npm'
|
|
42
42
|
- run: npm ci
|
|
43
43
|
- run: npm run lint
|
package/.markdownlint-cli2.cjs
CHANGED
|
@@ -16,11 +16,11 @@ const options = githubMarkdownOpinions.init({
|
|
|
16
16
|
'no-hard-tabs': false,
|
|
17
17
|
'first-line-heading': false,
|
|
18
18
|
'no-space-in-emphasis': false,
|
|
19
|
-
'blanks-around-fences': false
|
|
19
|
+
'blanks-around-fences': false,
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
module.exports = {
|
|
23
23
|
config: options,
|
|
24
24
|
customRules: ['@github/markdownlint-github'],
|
|
25
|
-
outputFormatters: [['markdownlint-cli2-formatter-pretty', {appendLink: true}]]
|
|
25
|
+
outputFormatters: [['markdownlint-cli2-formatter-pretty', {appendLink: true}]],
|
|
26
26
|
}
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v20
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# eslint-plugin-primer-react
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 8.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#381](https://github.com/primer/eslint-plugin-primer-react/pull/381) [`52f3be6`](https://github.com/primer/eslint-plugin-primer-react/commit/52f3be6881a522b0c9b261fe5acbe0c84a7deb5a) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Upgrade to ESLint v9 support with eslint-plugin-github v6
|
|
8
|
+
|
|
9
|
+
- [#380](https://github.com/primer/eslint-plugin-primer-react/pull/380) [`d42d5c0`](https://github.com/primer/eslint-plugin-primer-react/commit/d42d5c03a0e7df44efeed84baff2eca95af05113) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Update repository to Node.js v20
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
6
12
|
|
|
@@ -165,7 +171,6 @@
|
|
|
165
171
|
### Major Changes
|
|
166
172
|
|
|
167
173
|
- [#174](https://github.com/primer/eslint-plugin-primer-react/pull/174) [`d9832b8`](https://github.com/primer/eslint-plugin-primer-react/commit/d9832b850cbcf808ddcdfd3efbbab7d2bf913ccd) Thanks [@langermank](https://github.com/langermank)! - - Remove `no-deprecated-colors` plugin
|
|
168
|
-
|
|
169
174
|
- Remove dependency on `primer/primitives`
|
|
170
175
|
|
|
171
176
|
- [#172](https://github.com/primer/eslint-plugin-primer-react/pull/172) [`8e24d66`](https://github.com/primer/eslint-plugin-primer-react/commit/8e24d660065b3c690a14d826580c793d7b305068) Thanks [@langermank](https://github.com/langermank)! - [Breaking] Remove `new-color-css-vars-have-fallback`
|
|
@@ -376,7 +381,6 @@
|
|
|
376
381
|
- [#7](https://github.com/primer/eslint-plugin-primer-react/pull/7) [`d9dfb8d`](https://github.com/primer/eslint-plugin-primer-react/commit/d9dfb8de6d6dc42efe606517db7a0dd90d5c5578) Thanks [@colebemis](https://github.com/colebemis)! - Add `skipImportCheck` option. By default, the `no-deprecated-colors` rule will only check for deprecated colors used in functions and components that are imported from `@primer/react`. You can disable this behavior by setting `skipImportCheck` to `true`. This is useful for linting custom components that pass color-related props down to Primer React components.
|
|
377
382
|
|
|
378
383
|
* [#6](https://github.com/primer/eslint-plugin-primer-react/pull/6) [`dd14594`](https://github.com/primer/eslint-plugin-primer-react/commit/dd14594b05e4d800baa76771f5b911d77352a983) Thanks [@colebemis](https://github.com/colebemis)! - The `no-deprecated-colors` rule can now find deprecated colors in the following cases:
|
|
379
|
-
|
|
380
384
|
- Nested `sx` properties:
|
|
381
385
|
|
|
382
386
|
```jsx
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const js = require('@eslint/js')
|
|
4
|
+
const globals = require('globals')
|
|
5
|
+
const github = require('eslint-plugin-github')
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @type {import('eslint').Linter.FlatConfig[]}
|
|
9
|
+
*/
|
|
10
|
+
module.exports = [
|
|
11
|
+
{
|
|
12
|
+
ignores: ['node_modules/**', '.git/**'],
|
|
13
|
+
},
|
|
14
|
+
js.configs.recommended,
|
|
15
|
+
github.default.getFlatConfigs().recommended,
|
|
16
|
+
{
|
|
17
|
+
languageOptions: {
|
|
18
|
+
ecmaVersion: 'latest',
|
|
19
|
+
sourceType: 'commonjs',
|
|
20
|
+
globals: {
|
|
21
|
+
...globals.commonjs,
|
|
22
|
+
...globals.node,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
// Override specific rules for the repository
|
|
27
|
+
'import/no-commonjs': 'off',
|
|
28
|
+
'import/no-dynamic-require': 'off', // Allow dynamic requires in tests
|
|
29
|
+
'no-shadow': 'off',
|
|
30
|
+
'no-unused-vars': [
|
|
31
|
+
'error',
|
|
32
|
+
{
|
|
33
|
+
varsIgnorePattern: '^_',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
'github/filenames-match-regex': 'off', // Allow various file naming patterns
|
|
37
|
+
'i18n-text/no-en': 'off', // Allow English text in this repository
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
files: ['**/*.test.js'],
|
|
42
|
+
languageOptions: {
|
|
43
|
+
globals: {
|
|
44
|
+
...globals.jest,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
files: ['eslint.config.js'],
|
|
50
|
+
rules: {
|
|
51
|
+
'no-undef': 'off', // Allow require() in config file
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
]
|