diff --git a/eslint.config.mjs b/eslint.config.mjs index f2a0be7..ef233ab 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -4,53 +4,54 @@ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' import globals from 'globals'; import { config, configs } from 'typescript-eslint'; -export default config( - eslint.configs.recommended, - ...configs.recommended, - importPlugin.flatConfigs.recommended, - importPlugin.flatConfigs.typescript, - eslintPluginPrettierRecommended, - { - languageOptions: { - globals: { - ...globals.node - }, - parserOptions: { - tsconfigRootDir: import.meta.dirname - } +export default config({ + extends: [ + eslint.configs.recommended, + ...configs.recommended, + importPlugin.flatConfigs.recommended, + importPlugin.flatConfigs.typescript, + eslintPluginPrettierRecommended + ], + ignores: ['dist/**/*'], + languageOptions: { + globals: { + ...globals.node }, - settings: { - 'import/parsers': { - '@typescript-eslint/parser': ['.ts', '.tsx'] - }, - 'import/resolver': { - // You will also need to install and configure the TypeScript resolver - // See also https://github.com/import-js/eslint-import-resolver-typescript#configuration - typescript: { - project: './tsconfig.json' - }, - node: true - } + parserOptions: { + tsconfigRootDir: import.meta.dirname + } + }, + settings: { + 'import/parsers': { + '@typescript-eslint/parser': ['.ts', '.tsx'] }, - rules: { - 'import/no-unresolved': ['error', { caseSensitive: true }], - 'import/named': 'error', - 'import/first': 'warn', - 'import/no-duplicates': 'error', - 'import/extensions': ['warn', 'always', { js: 'never', ts: 'never', json: 'always' }], - 'import/newline-after-import': 'warn', - 'import/order': [ - 'warn', - { - 'newlines-between': 'never', - groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], - named: true, - alphabetize: { - order: 'asc' /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */, - caseInsensitive: true /* ignore case. Options: [true, false] */ - } - } - ] + 'import/resolver': { + // You will also need to install and configure the TypeScript resolver + // See also https://github.com/import-js/eslint-import-resolver-typescript#configuration + typescript: { + project: './tsconfig.json' + }, + node: true } + }, + rules: { + 'import/no-unresolved': ['error', { caseSensitive: true }], + 'import/named': 'error', + 'import/first': 'warn', + 'import/no-duplicates': 'error', + 'import/extensions': ['warn', 'always', { js: 'never', ts: 'never', json: 'always' }], + 'import/newline-after-import': 'warn', + 'import/order': [ + 'warn', + { + 'newlines-between': 'never', + groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], + named: true, + alphabetize: { + order: 'asc' /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */, + caseInsensitive: true /* ignore case. Options: [true, false] */ + } + } + ] } -); +}); diff --git a/tsconfig.json b/tsconfig.json index 8876fec..d4856b5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -58,7 +58,7 @@ // "noEmit": true, /* Disable emitting files from a compilation. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ "outDir": "./dist", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ + "removeComments": true, /* Disable emitting comments. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */