Skip to content

Commit

Permalink
Added eslint-plugin-regexp as dev dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Nov 14, 2024
1 parent 92abfed commit fe0868b
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ import js from '@eslint/js'
import globals from 'globals'
import json from '@eslint/json'
import markdown from '@eslint/markdown'
import * as regexp from 'eslint-plugin-regexp'
import eslintPluginYml from 'eslint-plugin-yml'

export default [
{
files: ['**/*.js', '**/*.mjs'],
languageOptions: { ecmaVersion: 2022, sourceType: 'script', globals: { ...globals.browser }},
plugins: { regexp },
rules: {
...js.configs.recommended.rules,
...js.configs.recommended.rules, ...regexp.configs['flat/recommended'].rules,
'indent': 'off', 'no-unexpected-multiline': 'off', // allow whitespace anywhere
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }], // enforce single quotes except backticks to avoid escaping quotes
'key-spacing': ['error', { 'beforeColon': false, 'afterColon': true }], // enforce spacing in object properties
Expand Down
85 changes: 85 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@eslint/json": "^0.6.0",
"@eslint/markdown": "^6.2.1",
"eslint": "^9.14.0",
"eslint-plugin-regexp": "^2.6.0",
"eslint-plugin-yml": "^1.15.0",
"husky": "^9.1.6"
}
Expand Down

0 comments on commit fe0868b

Please sign in to comment.