Skip to content

Commit

Permalink
update project typescript-eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
joephela committed Jul 12, 2024
1 parent 8150fdf commit cf27643
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
25 changes: 6 additions & 19 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
import { FlatCompat } from '@eslint/eslintrc'
import js from '@eslint/js'
import eslint from '@eslint/js'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import sort from 'eslint-plugin-sort'
import globals from 'globals'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)

//TODO: cleanup compat https://acquia.atlassian.net/browse/FE-1172
const compat = new FlatCompat({
allConfig: js.configs.all,
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
})
import tseslint from 'typescript-eslint'

export default [
{
ignores: ['**/lib/', '**/packages/eslint-playground/'],
},
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:sort/recommended',
),
eslint.configs.recommended,
...tseslint.configs.recommended,
sort.configs['flat/recommended'],
{
languageOptions: {
globals: {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"globals": "^15.8.0",
"jest": "^29.7.0",
"prettier": "^3.3.2",
"typescript": "^5.5.3"
"typescript": "^5.5.3",
"typescript-eslint": "^7.16.0"
}
}
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3739,6 +3739,7 @@ __metadata:
jest: ^29.7.0
prettier: ^3.3.2
typescript: ^5.5.3
typescript-eslint: ^7.16.0
languageName: unknown
linkType: soft

Expand Down

0 comments on commit cf27643

Please sign in to comment.