@newhighsco/eslint-config 5.2.0 → 5.3.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.
Files changed (2) hide show
  1. package/eslint.config.js +14 -12
  2. package/package.json +1 -1
package/eslint.config.js CHANGED
@@ -7,6 +7,7 @@ import json from '@eslint/json'
7
7
  import { defineConfig } from 'eslint/config'
8
8
  import cypress from 'eslint-plugin-cypress'
9
9
  import prettierRecommended from 'eslint-plugin-prettier/recommended'
10
+ import testingLibrary from 'eslint-plugin-testing-library'
10
11
 
11
12
  const gitignore = join(process.cwd(), '.gitignore')
12
13
  const compat = new FlatCompat()
@@ -74,24 +75,25 @@ export default defineConfig(
74
75
  'plugin:storybook/csf-strict'
75
76
  ],
76
77
  rules: { 'storybook/meta-inline-properties': 'error' }
77
- },
78
- // Testing Library
79
- {
80
- files: ['*.spec.*'],
81
- excludedFiles: ['*.spec.?(s)css'],
82
- extends: ['plugin:testing-library/react'],
83
- rules: {
84
- 'testing-library/no-node-access': [
85
- 'error',
86
- { allowContainerFirstChild: true }
87
- ]
88
- }
89
78
  }
90
79
  ].filter(Boolean)
91
80
  }),
92
81
  // JSON
93
82
  { files: ['**/*.json'], plugins: { json }, language: 'json/json' },
94
83
  { files: ['**/*.json'], ...prettierRecommended },
84
+ // Testing Library
85
+ {
86
+ files: ['**/*.spec.*'],
87
+ ignores: ['**/*.spec.?(s)css'],
88
+ ...testingLibrary.configs['flat/react'],
89
+ rules: {
90
+ ...testingLibrary.configs['flat/react'].rules,
91
+ 'testing-library/no-node-access': [
92
+ 'error',
93
+ { allowContainerFirstChild: true }
94
+ ]
95
+ }
96
+ },
95
97
  // Cypress
96
98
  { files: ['**/*.cy.*'], extends: [cypress.configs.recommended] },
97
99
  ignore && includeIgnoreFile(gitignore)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newhighsco/eslint-config",
3
3
  "description": "New High Score shareable config for ESLint",
4
- "version": "5.2.0",
4
+ "version": "5.3.0",
5
5
  "author": "New High Score",
6
6
  "license": "ISC",
7
7
  "private": false,