Skip to content

Commit

Permalink
Ignore dist directory during linting
Browse files Browse the repository at this point in the history
  • Loading branch information
JayCanuck committed Oct 28, 2024
1 parent 3251840 commit 61a08f9
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 47 deletions.
93 changes: 47 additions & 46 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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] */
}
}
]
}
);
});
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 61a08f9

Please sign in to comment.