Skip to content

Commit

Permalink
updating eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
SignpostMarv committed Aug 25, 2024
1 parent d87cc04 commit 7d28765
Show file tree
Hide file tree
Showing 10 changed files with 238 additions and 381 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

105 changes: 0 additions & 105 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ package.json
LICENSE.md
**/*.ts
**/*.js
**/*.mjs
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ lint--prettier:
@NODE_OPTIONS='' ./node_modules/.bin/prettier . --check

lint--eslint:
@echo 'checking eslint for fixable issues'
@./node_modules/.bin/eslint --cache './*.ts' src tests --fix-dry-run
@NODE_OPTIONS='' ./node_modules/.bin/tsc --project ./tsconfig.eslint.json
@echo 'checking eslint for all issues with config'
@./node_modules/.bin/eslint --config eslint.config.js.mjs --cache './**/*.mjs'
@echo 'checking eslint for all issues'
@./node_modules/.bin/eslint --cache './*.ts' src tests
@./node_modules/.bin/eslint --cache './**/*.ts'

lint: lint--prettier lint--tsc lint--eslint

Expand Down
11 changes: 11 additions & 0 deletions eslint.config.js.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {
javascript as config,
} from '@signpostmarv/eslint-config';

export default [
...config,
{
files: ['**/*.mjs'],
ignores: ['**/*.js'],
},
];
18 changes: 18 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import config from '@signpostmarv/eslint-config';
import parser from '@typescript-eslint/parser';

export default [
{
languageOptions: {
parser,
parserOptions: {
project: ['./tsconfig.eslint.json'],
},
},
},
...config,
{
files: ['index.ts', 'src/*.ts', 'tests/*.ts'],
ignores: ['**/*.d.ts', '**/*.js', '**/*.mjs'],
},
];
Loading

0 comments on commit 7d28765

Please sign in to comment.