Skip to content

Commit

Permalink
Eslint 9
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Jun 18, 2024
1 parent 907851c commit a7d2ea3
Show file tree
Hide file tree
Showing 5 changed files with 561 additions and 482 deletions.
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

41 changes: 0 additions & 41 deletions .eslintrc.cjs

This file was deleted.

72 changes: 72 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { fixupConfigRules } from '@eslint/compat'
import tsParser from '@typescript-eslint/parser'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

export default [
{
ignores: ['**/coverage', '**/node_modules/', '**/dist'],
},
...fixupConfigRules(
compat.extends(
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
),
),
{
languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: 'script',

parserOptions: {
ecmaFeatures: {
jsx: true,
},

tsconfigRootDir: '/home/cdiesh/src/jbrowse-plugin-msaview',
project: './tsconfig.json',
},
},

settings: {
react: {
version: 'detect',
},
},

rules: {
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/require-await': 'off',

'@typescript-eslint/no-unused-vars': [
'warn',
{
args: 'after-used',
ignoreRestSiblings: true,
},
],
},
},
]
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"start": "node esbuild.mjs",
"build": "tsc && NODE_ENV=production node esbuild.mjs",
"prebuild": "npm run clean",
"lint": "eslint --report-unused-disable-directives --max-warnings 0 --ext .js,.ts,.jsx,.tsx src/",
"lint": "eslint --report-unused-disable-directives --max-warnings 0 src/",
"prepack": "npm run build",
"postversion": "git push --follow-tags"
},
Expand All @@ -43,6 +43,7 @@
},
"devDependencies": {
"@emotion/react": "^11.10.4",
"@eslint/compat": "^1.1.0",
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
"@jbrowse/core": "^2.10.1",
"@jbrowse/plugin-linear-genome-view": "^2.7.0",
Expand All @@ -56,7 +57,7 @@
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"esbuild": "^0.21.4",
"eslint": "^8.51.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.0",
"eslint-plugin-react": "^7.20.3",
Expand Down
Loading

0 comments on commit a7d2ea3

Please sign in to comment.