Skip to content

Commit

Permalink
chore: update ESLint configs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomiguelino committed Dec 27, 2024
1 parent c167151 commit 1d69f7f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -17,7 +19,8 @@ export default [
...compat.extends(
'eslint:recommended',
'plugin:react/recommended',
'plugin:jasmine/recommended'
'plugin:jasmine/recommended',
'plugin:@typescript-eslint/recommended'
),
{
ignores: [
Expand All @@ -27,9 +30,10 @@ export default [
],
},
{
files: ['**/*.{js,jsx,mjs}'],
files: ['**/*.{js,jsx,mjs,ts,tsx}'],
plugins: {
jasmine,
'@typescript-eslint': tseslint,
},

settings: {
Expand All @@ -39,6 +43,7 @@ export default [
},

languageOptions: {
parser: tsparser,
globals: {
...globals.browser,
...globals.jasmine,
Expand All @@ -47,10 +52,8 @@ export default [
SharedArrayBuffer: 'readonly',
React: 'readonly',
},

ecmaVersion: 'latest',
sourceType: 'module',

parserOptions: {
ecmaFeatures: {
jsx: true,
Expand All @@ -60,6 +63,8 @@ export default [

rules: {
'react/prop-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
},
}
];

0 comments on commit 1d69f7f

Please sign in to comment.