Skip to content

Commit

Permalink
Implemented eslint-plugin-import as dev dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Dec 16, 2024
1 parent 54d6c5e commit 9289a8b
Show file tree
Hide file tree
Showing 3 changed files with 1,832 additions and 60 deletions.
9 changes: 6 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import js from '@eslint/js'
import globals from 'globals'
import stylisticJS from '@stylistic/eslint-plugin-js'
import importPlugin from 'eslint-plugin-import'
import json from '@eslint/json'
import markdown from '@eslint/markdown'
import regexp from 'eslint-plugin-regexp'
import stylisticJS from '@stylistic/eslint-plugin-js'
import yml from 'eslint-plugin-yml'

export default [
Expand All @@ -13,9 +14,11 @@ export default [
ecmaVersion: 'latest', sourceType: 'script',
globals: { ...globals.browser, ...globals.greasemonkey, chatgpt: 'readonly' }
},
plugins: { regexp, 'js-styles': stylisticJS },
plugins: { 'import': importPlugin, 'js-styles': stylisticJS, regexp },
rules: {
...js.configs.recommended.rules, ...regexp.configs['flat/recommended'].rules,
...js.configs.recommended.rules,
...importPlugin.flatConfigs.recommended.rules,
...regexp.configs['flat/recommended'].rules,
'indent': 'off', 'no-unexpected-multiline': 'off', 'key-spacing': 'off', // allow whitespace anywhere
'js-styles/no-trailing-spaces': 'error', // ...except at ends of lines
'js-styles/max-len': ['error', { 'code': 120, // limit lines to 120 chars except if containing...
Expand Down
Loading

0 comments on commit 9289a8b

Please sign in to comment.