eslint-plugin-primer-react 8.0.0-rc.07c367d → 8.0.0-rc.9fc6044

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.
Files changed (27) hide show
  1. package/.markdownlint-cli2.cjs +2 -2
  2. package/CHANGELOG.md +2 -2
  3. package/eslint.config.js +54 -0
  4. package/package-lock.json +2510 -8234
  5. package/package.json +15 -9
  6. package/src/rules/__tests__/a11y-explicit-heading.test.js +5 -3
  7. package/src/rules/__tests__/a11y-link-in-text-block.test.js +5 -3
  8. package/src/rules/__tests__/a11y-no-duplicate-form-labels.test.js +5 -9
  9. package/src/rules/__tests__/a11y-no-title-usage.test.js +5 -3
  10. package/src/rules/__tests__/a11y-remove-disable-tooltip.test.js +5 -3
  11. package/src/rules/__tests__/a11y-tooltip-interactive-trigger.test.js +5 -3
  12. package/src/rules/__tests__/a11y-use-accessible-tooltip.test.js +5 -3
  13. package/src/rules/__tests__/direct-slot-children.test.js +5 -3
  14. package/src/rules/__tests__/enforce-button-for-link-with-nohref.test.js +5 -3
  15. package/src/rules/__tests__/enforce-css-module-identifier-casing.test.js +5 -3
  16. package/src/rules/__tests__/new-color-css-vars.test.js +5 -3
  17. package/src/rules/__tests__/no-deprecated-entrypoints.test.js +5 -3
  18. package/src/rules/__tests__/no-deprecated-experimental-components.test.js +5 -3
  19. package/src/rules/__tests__/no-deprecated-props.test.js +5 -3
  20. package/src/rules/__tests__/no-system-props.test.js +5 -4
  21. package/src/rules/__tests__/no-unnecessary-components.test.js +6 -4
  22. package/src/rules/__tests__/no-wildcard-imports.test.js +6 -43
  23. package/src/rules/__tests__/prefer-action-list-item-onselect.test.js +6 -4
  24. package/src/rules/__tests__/use-deprecated-from-deprecated.test.js +5 -3
  25. package/src/rules/no-deprecated-experimental-components.js +0 -1
  26. package/.eslintignore +0 -2
  27. package/.eslintrc.js +0 -39
@@ -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/CHANGELOG.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  ### Major Changes
6
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
+
7
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
8
10
 
9
11
  ### Minor Changes
@@ -169,7 +171,6 @@
169
171
  ### Major Changes
170
172
 
171
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
172
-
173
174
  - Remove dependency on `primer/primitives`
174
175
 
175
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`
@@ -380,7 +381,6 @@
380
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.
381
382
 
382
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:
383
-
384
384
  - Nested `sx` properties:
385
385
 
386
386
  ```jsx
@@ -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
+ ]