-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: introduce typescript eslint rules
- Loading branch information
1 parent
6d6b7fb
commit dd14679
Showing
22 changed files
with
1,288 additions
and
2,230 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import globals from 'globals'; | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
{ | ||
ignores: [ | ||
'docs/**/*.js', | ||
'packages/*/test/fixtures/*', | ||
'**/dist/**/*', | ||
'packages/fetch-mock/types/index.test-d.ts', | ||
], | ||
}, | ||
{ | ||
rules: { | ||
'no-prototype-builtins': 0 | ||
}, | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
} | ||
} | ||
}, | ||
{ | ||
files: [ | ||
'import-compat/*', | ||
'**/*.cjs', | ||
'packages/fetch-mock/test/framework-compat/jest.spec.js', | ||
'packages/fetch-mock/test/fixtures/fetch-proxy.js' | ||
], | ||
rules: { | ||
'@typescript-eslint/no-require-imports': 0 | ||
}, | ||
|
||
}, | ||
{ | ||
files: ['packages/fetch-mock/test/**/*.js'], | ||
languageOptions: {globals: { | ||
testGlobals: 'writable', | ||
}}, | ||
}, | ||
{ | ||
files: ['packages/fetch-mock/test/fixtures/sw.js'], | ||
languageOptions: {globals: { | ||
...globals.browser | ||
}}, | ||
} | ||
); | ||
|
||
// module.exports = { | ||
// env: { | ||
// browser: true, | ||
// es2021: true, | ||
// node: true, | ||
// }, | ||
// extends: ['origami-component', 'plugin:prettier/recommended'], | ||
|
||
// ], | ||
// overrides: [ | ||
// { | ||
// files: ['packages/*/test/**/*.js'], | ||
// globals: { | ||
// testGlobals: 'writable', | ||
// }, | ||
// rules: { | ||
// 'class-methods-use-this': 0, | ||
// 'no-throw-literal': 0, | ||
// 'no-empty': 0, | ||
// 'no-console': 0, | ||
// 'prefer-promise-reject-errors': 0, | ||
// }, | ||
// }, | ||
// parserOptions: { | ||
// ecmaVersion: 'latest', | ||
// sourceType: 'module', | ||
// }, | ||
// rules: { | ||
// '@lwc/lwc/no-async-await': 0, | ||
// 'jsdoc/require-param-description': 0, | ||
// 'jsdoc/require-returns-description': 0, | ||
// 'jsdoc/require-property-description': 0, | ||
// }, | ||
// }; |
Oops, something went wrong.