-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove tslint.json * install and configure eslint * resolve lint errors * add eslint to ci-checks * enable eslint type-checked rules * fix type-check errors * add eslint fix commits to .git-blame-ignore-revs * allow empty object types * disable no-unnecessary-type-constraints on specific lines * revert removal of non-conforming type check in actions * resolve lint errors * Update packages/core/src/types.ts Co-authored-by: Mateusz Burzyński <[email protected]> * Update packages/core/src/types.ts Co-authored-by: Mateusz Burzyński <[email protected]> * Update packages/xstate-inspect/src/server.ts Co-authored-by: Mateusz Burzyński <[email protected]> --------- Co-authored-by: David Khourshid <[email protected]> Co-authored-by: Mateusz Burzyński <[email protected]>
- Loading branch information
1 parent
7b8a100
commit ca0a5f8
Showing
49 changed files
with
731 additions
and
229 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# eslint | ||
.eslintcache | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
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
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,89 @@ | ||
// @ts-check | ||
import globals from 'globals'; | ||
import js from '@eslint/js'; | ||
import ts from 'typescript-eslint'; | ||
|
||
export default ts.config( | ||
// plugins | ||
js.configs.recommended, | ||
...ts.configs.recommendedTypeChecked, | ||
|
||
// global ignore | ||
{ | ||
ignores: [ | ||
'{docs,examples,templates}/', | ||
'**/dist', | ||
'**/*.test.*', | ||
'scripts/jest-utils/' | ||
] | ||
}, | ||
|
||
// global language and linter options | ||
{ | ||
languageOptions: { | ||
globals: { ...globals.browser, ...globals.node }, | ||
parserOptions: { | ||
projectService: true, | ||
tsconfigRootDir: import.meta.dirname | ||
} | ||
}, | ||
linterOptions: { | ||
reportUnusedDisableDirectives: 'error' | ||
} | ||
}, | ||
|
||
// global rule overrides | ||
{ | ||
rules: { | ||
'@typescript-eslint/no-empty-object-type': [ | ||
'error', | ||
{ | ||
allowInterfaces: 'with-single-extends', | ||
allowObjectTypes: 'always' | ||
} | ||
], | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
args: 'all', | ||
argsIgnorePattern: '^_', | ||
caughtErrors: 'all', | ||
caughtErrorsIgnorePattern: '^_', | ||
destructuredArrayIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
ignoreRestSiblings: true | ||
} | ||
], | ||
'@typescript-eslint/unbound-method': 'off', | ||
'prefer-const': [ | ||
'error', | ||
{ | ||
destructuring: 'all' | ||
} | ||
] | ||
} | ||
}, | ||
|
||
// disable type-checking for js files | ||
{ | ||
files: ['**/*.{js,cjs,mjs}'], | ||
...ts.configs.disableTypeChecked | ||
}, | ||
|
||
// js-specific config and rules | ||
{ | ||
files: ['**/*.{js,cjs}'], | ||
languageOptions: { | ||
sourceType: 'commonjs' | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-require-imports': 'off' | ||
} | ||
} | ||
); |
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.