Skip to content

Commit

Permalink
🛠️ [Eslint] Migrate config file
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed May 30, 2024
1 parent 5c4bc44 commit 01cd9e1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

49 changes: 31 additions & 18 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
{
"env": {
"browser": true,
"es2022": true,
import globals from 'globals';
import configLove from 'eslint-config-love';
// Includes both `config` and `plugin`.
import pluginPrettier from 'eslint-plugin-prettier/recommended';

export default [
{
ignores: ['coverage/**', 'dist/**'],
},
"extends": ["love", "plugin:prettier/recommended"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json",
configLove,
pluginPrettier,
{
name: 'custom-rules',
files: ['**/*.ts', '**/*.js', '**/*.mjs'],
languageOptions: {
...configLove.languageOptions,
globals: {
...globals.browser,
},
ecmaVersion: 2022,
sourceType: 'module',
},
rules: {
'no-console': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
// '@typescript-eslint/strict-boolean-expressions': 'off',
'@typescript-eslint/consistent-indexed-object-style': [
'error',
'index-signature',
],
},
},
"rules": {
"no-console": "warn",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/consistent-indexed-object-style": [
"error",
"index-signature",
],
},
}
];

0 comments on commit 01cd9e1

Please sign in to comment.