Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/configs/flat/recommended.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import globals from 'globals'
import github from '../../plugin.js'
import prettierPlugin from 'eslint-plugin-prettier'
import eslintComments from 'eslint-plugin-eslint-comments'
import eslintComments from '@eslint-community/eslint-plugin-eslint-comments'
import importPlugin from 'eslint-plugin-import'
import i18nTextPlugin from 'eslint-plugin-i18n-text'
import noOnlyTestsPlugin from 'eslint-plugin-no-only-tests'
Expand Down
16 changes: 8 additions & 8 deletions lib/configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ export default {
env: {
es6: true,
},
plugins: ['github', 'prettier', 'eslint-comments', 'import', 'filenames', 'i18n-text', 'no-only-tests'],
plugins: ['github', 'prettier', '@eslint-community/eslint-plugin-eslint-comments', 'import', 'filenames', 'i18n-text', 'no-only-tests'],
rules: {
'constructor-super': 'error',
'eslint-comments/disable-enable-pair': 'off',
'eslint-comments/no-aggregating-enable': 'off',
'eslint-comments/no-duplicate-disable': 'error',
'eslint-comments/no-unlimited-disable': 'error',
'eslint-comments/no-unused-disable': 'error',
'eslint-comments/no-unused-enable': 'error',
'eslint-comments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
'@eslint-community/eslint-plugin-eslint-comments/disable-enable-pair': 'off',
'@eslint-community/eslint-plugin-eslint-comments/no-aggregating-enable': 'off',
'@eslint-community/eslint-plugin-eslint-comments/no-duplicate-disable': 'error',
'@eslint-community/eslint-plugin-eslint-comments/no-unlimited-disable': 'error',
'@eslint-community/eslint-plugin-eslint-comments/no-unused-disable': 'error',
'@eslint-community/eslint-plugin-eslint-comments/no-unused-enable': 'error',
'@eslint-community/eslint-plugin-eslint-comments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
Comment on lines +11 to +20
'filenames/match-regex': ['error', '^[a-z0-9-]+(.[a-z0-9-]+)?$'],
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
'github/array-foreach': 'error',
Expand Down
5 changes: 4 additions & 1 deletion lib/rules/get-attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const camelCaseAttributes = Object.values(svgElementAttributes)
const validSVGAttributeSet = new Set(camelCaseAttributes)

// lowercase variants of camelCase SVG attributes are probably an error
const invalidSVGAttributeSet = new Set(camelCaseAttributes.map(name => name.toLowerCase()))
const invalidSVGAttributeSet = new Set(camelCaseAttributes
.filter(name => typeof name === 'string')
.map(name => name.toLowerCase())
)
Comment on lines +16 to +18

function isValidAttribute(name) {
return validSVGAttributeSet.has(name) || (validAttributeName.test(name) && !invalidSVGAttributeSet.has(name))
Expand Down
Loading
Loading