Skip to content

Commit

Permalink
replace eslint-plugin-filenames with eslint-plugin-canonical sinc…
Browse files Browse the repository at this point in the history
…e `eslint-plugin-canonical` is no longer maintained and does not support ESLint 9

however, too many dependencies -/
  • Loading branch information
zloirock committed Apr 6, 2024
1 parent 0cac388 commit 3e58c09
Show file tree
Hide file tree
Showing 4 changed files with 1,812 additions and 98 deletions.
6 changes: 3 additions & 3 deletions scripts/bundle-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions tests/eslint/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import globals from 'globals';
import confusingBrowserGlobals from 'confusing-browser-globals';
import parserJSONC from 'jsonc-eslint-parser';
import pluginArrayFunc from 'eslint-plugin-array-func';
import pluginCanonical from 'eslint-plugin-canonical';
import pluginESX from 'eslint-plugin-es-x';
import pluginESlintComments from '@eslint-community/eslint-plugin-eslint-comments';
import pluginFilenames from 'eslint-plugin-filenames';
import pluginImport from 'eslint-plugin-import-x';
import pluginJSONC from 'eslint-plugin-jsonc';
import pluginN from 'eslint-plugin-n';
Expand Down Expand Up @@ -1519,9 +1519,9 @@ export default [
plugins: {
'@stylistic/js': pluginStylisticJS,
'array-func': pluginArrayFunc,
canonical: pluginCanonical,
es: pluginESX,
'eslint-comments': pluginESlintComments,
filenames: pluginFilenames,
import: pluginImport,
jsonc: pluginJSONC,
node: pluginN,
Expand Down Expand Up @@ -1653,7 +1653,7 @@ export default [
{
rules: {
// ensure that filenames match a convention
'filenames/match-regex': [ERROR, /^[\da-z]|[a-z][\d\-.a-z]*[\da-z]$/],
'canonical/filename-match-regex': [ERROR, { regex: '^[\\da-z]|[a-z][\\d\\-.a-z]*[\\da-z]$' }],
},
},
{
Expand All @@ -1662,7 +1662,7 @@ export default [
],
rules: {
// ensure that filenames match a convention
'filenames/match-regex': [ERROR, /^(?:es|esnext|web)(?:\.[a-z][\d\-a-z]*[\da-z])+$/],
'canonical/filename-match-regex': [ERROR, { regex: '^(?:es|esnext|web)(?:\\.[a-z][\\d\\-a-z]*[\\da-z])+$' }],
},
},
{
Expand All @@ -1671,7 +1671,7 @@ export default [
],
rules: {
// ensure that filenames match a convention
'filenames/match-regex': [ERROR, /^(?:es|esnext|helpers|web)(?:\.[a-z][\d\-a-z]*[\da-z])+$/],
'canonical/filename-match-regex': [ERROR, { regex: '^(?:es|esnext|helpers|web)(?:\\.[a-z][\\d\\-a-z]*[\\da-z])+$' }],
},
},
{
Expand Down

0 comments on commit 3e58c09

Please sign in to comment.