forked from alangpierce/sucrase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up eslint, tslint, and prettier (alangpierce#2)
Fow now it only runs on the main typescript code, but I'll enable it on the parser later.
- Loading branch information
1 parent
45ad769
commit 76b67ad
Showing
21 changed files
with
1,830 additions
and
792 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const tslintRules = require('./tslint.json'); | ||
|
||
module.exports = { | ||
"extends": ["airbnb-base", "prettier"], | ||
parser: 'typescript-eslint-parser', | ||
// Add typescript plugin but don't use it, since that tells WebStorm to run | ||
// ESLint for .ts files. | ||
plugins: ['prettier', 'tslint', 'typescript'], | ||
rules: { | ||
"class-methods-use-this": "off", | ||
"import/extensions": "off", | ||
"no-constant-condition": ["error", {"checkLoops": false}], | ||
"no-continue": "off", | ||
"no-empty-function": "off", | ||
"no-param-reassign": "off", | ||
"no-plusplus": "off", | ||
"no-restricted-syntax": "off", | ||
"no-undef": "off", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
// False positive on TS constructors with initializers. | ||
"no-useless-constructor": "off", | ||
"prefer-destructuring": "off", | ||
"prettier/prettier": "error", | ||
"tslint/config": ["error", tslintRules], | ||
}, | ||
settings: { | ||
"import/extensions": ['.js', '.ts'], | ||
"import/resolver": { | ||
node: { | ||
extensions: ['.js', '.ts'], | ||
}, | ||
}, | ||
}, | ||
}; |
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,7 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSpacing": false, | ||
"parser": "typescript", | ||
"printWidth": 100, | ||
"trailingComma": "all", | ||
} |
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.