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 6fe41be commit 7128415
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,18 +1,21 @@
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 [
{
files: ['**/*.js', '**/*.mjs'],
languageOptions: { ecmaVersion: 'latest', sourceType: 'script', globals: { ...globals.browser, ...globals.greasemonkey }},
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 7128415

Please sign in to comment.