Skip to content

Commit

Permalink
fix: use eslint to replace tslint. fix some lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
calimanco committed Jan 6, 2021
1 parent 59377fe commit 15ef598
Show file tree
Hide file tree
Showing 18 changed files with 832 additions and 214 deletions.
11 changes: 11 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules/
dist/
compiled/
coverage/
.vscode/
.nyc_output/
git_stats/
yarn-offline/
docs/
__mock__/
.temp/
14 changes: 14 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-extra-semi": "off"
}
}
42 changes: 15 additions & 27 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
module.exports = {
"transform": {
".(ts|tsx)": "ts-jest"
transform: {
'.(ts|tsx)': 'ts-jest'
},
"testEnvironment": "jsdom",
"testRegex": "/test/.*\\.(test|spec)\\.(ts)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"/test/"
],
"coverageThreshold": {
"global": {
"branches": 90,
"functions": 95,
"lines": 95,
"statements": 95
testEnvironment: 'jsdom',
testRegex: '/test/.*\\.(test|spec)\\.(ts)$',
moduleFileExtensions: ['ts', 'tsx', 'js'],
coveragePathIgnorePatterns: ['/node_modules/', '/test/'],
coverageThreshold: {
global: {
branches: 90,
functions: 95,
lines: 95,
statements: 95
}
},
"collectCoverageFrom": [
"src/*.{js,ts}",
"src/**/*.{js,ts}"
],
"setupFilesAfterEnv": [
"<rootDir>/test/boot.ts"
]
}
collectCoverageFrom: ['src/*.{js,ts}', 'src/**/*.{js,ts}'],
setupFilesAfterEnv: ['<rootDir>/test/boot.ts']
}
Loading

0 comments on commit 15ef598

Please sign in to comment.