-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add eslint settings for TypeScript (#1205)
* wip: Proposal of eslint setting of TypeScript. * Add eslint settings for TypeScript * Modify TypeScript lint target file
- Loading branch information
Showing
5 changed files
with
862 additions
and
3,536 deletions.
There are no files selected for viewing
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,50 @@ | ||
const javascriptSettings = { | ||
files: ['*.js'], | ||
extends: [ | ||
'standard', | ||
'plugin:jest/recommended' | ||
], | ||
rules: { | ||
'no-else-return': ['error', { allowElseIf: false }], | ||
'no-var': 'warn', | ||
'one-var': 'off', | ||
'space-before-function-paren': ['error', 'never'], | ||
semi: ['error', 'always'] | ||
}, | ||
} | ||
|
||
const typescriptSettings = { | ||
files: ['*.ts'], | ||
extends: ['standard-with-typescript'], | ||
parserOptions: { | ||
project: './tsconfig.json' | ||
}, | ||
rules: { | ||
'no-else-return': ['error', { allowElseIf: false }], | ||
'no-var': 'warn', | ||
'one-var': 'off', | ||
'space-before-function-paren': ['error', 'never'], | ||
semi: ['error', 'always'], | ||
'@typescript-eslint/member-delimiter-style': [ | ||
'error', | ||
{ | ||
multiline: { | ||
delimiter: 'semi', | ||
requireLast: true | ||
}, | ||
singleline: { | ||
delimiter: 'semi', | ||
requireLast: false | ||
} | ||
} | ||
] | ||
} | ||
} | ||
|
||
module.exports = { | ||
plugins: ['jest'], | ||
overrides: [ | ||
javascriptSettings, | ||
typescriptSettings | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.