Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to ESLint flat config #2622

Merged
merged 12 commits into from
Dec 16, 2023
Prev Previous commit
Next Next commit
chore: migrate TS plugin
  • Loading branch information
MuhammadM1998 committed Dec 15, 2023
commit eba71d2c89fcec9e27f799f0a4bfb2f7ab23bbb8
10 changes: 5 additions & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ module.exports = {
// node: true
// },
// extends: ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/eslint-recommended', 'prettier'],
plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser',
// plugins: ['@typescript-eslint'],
parser: '@typescript-eslint/parser'
// parserOptions: {
// // project: true,
// sourceType: 'module'
// },
rules: {
'@typescript-eslint/ban-ts-comment': 'off'
}
// rules: {
// '@typescript-eslint/ban-ts-comment': 'off'
// }
}
10 changes: 9 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import tsEsLintPlugin from '@typescript-eslint/eslint-plugin'
import eslintConfigPrettier from 'eslint-config-prettier'

// extends: ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/eslint-recommended', 'prettier']

export default [
// Globals
{
Expand All @@ -11,5 +13,11 @@ export default [
// Extends
...tsEsLintPlugin.configs['recommended'].rules,
...tsEsLintPlugin.configs['eslint-recommended'],
eslintConfigPrettier
eslintConfigPrettier,

// TS Plugin
{
plugins: { '@typescript-eslint': tsEsLintPlugin },
rules: { '@typescript-eslint/ban-ts-comment': 'off' }
}
]