Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ESLint #597

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

41 changes: 41 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
ignores: [
'.azure-pipelines/**',
'dist/**',
],
},
{
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['*.?(m)js'],
},
tsconfigRootDir: import.meta.dirname,
}
},
rules: {
// Allow numbers and booleans in template expressions
'@typescript-eslint/restrict-template-expressions': ['error', {
allowNumber: true,
allowBoolean: true,
}],
// Always use `return await` in async functions
'@typescript-eslint/return-await': ['error', 'always'],
// Prefer using String.match
'@typescript-eslint/prefer-regexp-exec': 'off',
},
},
{
files: ['**/*.?(m)js'],
extends: [tseslint.configs.disableTypeChecked],
},
);
Loading
Loading