From ea4fb3dd1903e3a0271a85eb7644a9f49183174a Mon Sep 17 00:00:00 2001 From: Vilius Date: Wed, 31 Jul 2024 18:05:12 +0300 Subject: [PATCH] chore: remove unused eslintrc config, add recommended config to current eslint config --- .eslintrc.cjs | 33 --------------------------------- eslint.config.js | 3 +++ 2 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 .eslintrc.cjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index fdee5c4..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint-env node */ - -module.exports = { - root: true, - extends: [ - 'eslint:recommended', - 'airbnb-base', // or any other config you want to extend - 'airbnb-typescript/base', - 'prettier' - ], - parserOptions: { - ecmaVersion: 'latest', - project: './tsconfig.eslint.json', - tsconfigRootDir: __dirname - }, - ignorePatterns: ['**/*.js'], - rules: { - // we can override some problematic import rules here - // that can cause issues when using import aliases. - 'import/extensions': 'off', - 'import/no-extraneous-dependencies': 'off', - - // functions are always hoisted, so we can use them before they are defined - // which in various cases improves readability - 'no-use-before-define': ['error', {functions: false}], - '@typescript-eslint/no-use-before-define': ['error', {functions: false}], - - 'import/prefer-default-export': 'off', - 'no-console': 'off', - 'react/react-in-jsx-scope': 'off', - 'react/no-unknown-property': 'off' - } -} diff --git a/eslint.config.js b/eslint.config.js index fc6789c..23805a7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -2,8 +2,10 @@ import globals from 'globals' import pluginJs from '@eslint/js' import tseslint from 'typescript-eslint' import prettier from 'eslint-config-prettier' +import js from '@eslint/js' export default [ + js.configs.recommended, { files: ['**/*.{js,mjs,cjs,ts}'], rules: { @@ -33,6 +35,7 @@ export default [ // It's important to use Kysely and not Kysely. // Migrations should never depend on the current code of your app // because they need to work even when the app changes. + name: 'kysely_any_db', files: ['**/database/migrat*/*.ts'], rules: { '@typescript-eslint/no-explicit-any': 'off'