Skip to content

Commit

Permalink
fix: optimize configurations
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Kollitsch <[email protected]>
  • Loading branch information
davidsneighbour committed Aug 24, 2024
1 parent 554fad3 commit cae568a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
27 changes: 14 additions & 13 deletions packages/eslint-config/configs/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import stylisticJs from '@stylistic/eslint-plugin-js'
import fs from 'node:fs';

const path = './tsconfig.eslint.json';
let projectValue = '';
let projectPath = '';
if (fs.existsSync(path)) {
projectValue = path;
projectPath = path;
}

export default {
name: 'dnb/default',
plugins: {
'@stylistic/js': stylisticJs
},
// files: '',
// ignores: '',
files: ["**/!(*.*)"],
ignores: [
'**/node_modules/*',
'**/vendor/*',
'**/.git/*',
],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
Expand All @@ -27,13 +28,17 @@ export default {
},
parserOptions: {
impliedStrict: true,
project: projectValue, // keep in for now, this belongs to typescript setup
project: projectPath, // keep in for now, this belongs to typescript setup
extraFileExtensions: ['json'],
},
},
linterOptions: {
reportUnusedDisableDirectives: 'error',
},
// processor: {},
plugins: {
'@stylistic/js': stylisticJs
},
rules: {
'@stylistic/js/indent': ['error', 2],
'anti-trojan-source/no-bidi': 'error',
Expand All @@ -43,9 +48,5 @@ export default {
'@typescript-eslint/no-var-requires': 'off',
'import/no-unresolved': 'off',
},
ignores: [
'**/node_modules/*',
'**/vendor/*',
'**/.git/*',
],
// settings: {},
}
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import eslint from '@eslint/js';
import markdown from "eslint-plugin-markdown";
import defaultConfig from './configs/default.js';
import hugoConfig from './configs/default.hugo.js';
import markdownConfig from './configs/markdown.js';

export default [
eslint.configs.recommended,
eslint.configs.all,
// @ts-ignore
...markdown.configs.recommended,
defaultConfig,
hugoConfig,
markdownConfig,
];

0 comments on commit cae568a

Please sign in to comment.