Skip to content

Commit 1a77031

Browse files
committed
Updates to add eslint10 to peer dependencies
1 parent ec800f4 commit 1a77031

5 files changed

Lines changed: 602 additions & 355 deletions

File tree

lib/configs/flat/recommended.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import globals from 'globals'
22
import github from '../../plugin.js'
33
import prettierPlugin from 'eslint-plugin-prettier'
4-
import eslintComments from 'eslint-plugin-eslint-comments'
4+
import eslintComments from '@eslint-community/eslint-plugin-eslint-comments'
55
import importPlugin from 'eslint-plugin-import'
66
import i18nTextPlugin from 'eslint-plugin-i18n-text'
77
import noOnlyTestsPlugin from 'eslint-plugin-no-only-tests'

lib/configs/recommended.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
env: {
99
es6: true,
1010
},
11-
plugins: ['github', 'prettier', 'eslint-comments', 'import', 'filenames', 'i18n-text', 'no-only-tests'],
11+
plugins: ['github', 'prettier', '@eslint-community/eslint-comments', 'import', 'filenames', 'i18n-text', 'no-only-tests'],
1212
rules: {
1313
'constructor-super': 'error',
1414
'eslint-comments/disable-enable-pair': 'off',

lib/rules/get-attribute.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ const camelCaseAttributes = Object.values(svgElementAttributes)
1212
const validSVGAttributeSet = new Set(camelCaseAttributes)
1313

1414
// lowercase variants of camelCase SVG attributes are probably an error
15-
const invalidSVGAttributeSet = new Set(camelCaseAttributes.map(name => name.toLowerCase()))
15+
const invalidSVGAttributeSet = new Set(camelCaseAttributes
16+
.filter(name => typeof name === 'string')
17+
.map(name => name.toLowerCase())
18+
)
1619

1720
function isValidAttribute(name) {
1821
return validSVGAttributeSet.has(name) || (validAttributeName.test(name) && !invalidSVGAttributeSet.has(name))

0 commit comments

Comments
 (0)