-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- force `git` to keep original line-endings (tests fail otherwise) - pin `@types/node` to v8 (was: v10) - update `eslint` and plugins - update `typescript`, `tslib`, `ts-node` - add typescript's native typechecking as `typecheck` npm script - add `typescript-eslint` and enable linting in ts files - remove redundant eslint rules - add `eol-last`, `no-trailing-spaces` and `dot-notation` rules `eslint`, `prettier` and `editorconfig` settings used to conflict with each other, so I aligned them (where possible) to the `eslint` rules TODO: fix all linting errors in typescript TODO: refactor typescript interfaces to make compilation type-safe
- Loading branch information
Showing
9 changed files
with
548 additions
and
305 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 |
---|---|---|
@@ -1,16 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = tab | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
|
||
[test/**/expected.css] | ||
indent_style = tab | ||
insert_final_newline = false | ||
trim_trailing_whitespace = true | ||
|
||
[{package.json,.travis.yml,.eslintrc.json}] | ||
indent_style = space | ||
indent_size = 2 | ||
[.travis.yml] | ||
indent_style = space |
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,52 @@ | ||
module.exports = { | ||
root: true, | ||
|
||
rules: { | ||
// automatically fixable stylistic rules | ||
'arrow-spacing': 2, | ||
'comma-dangle': [2, 'never'], | ||
'dot-notation': 2, | ||
'eol-last': [2, 'never'], | ||
indent: [2, 'tab', { SwitchCase: 1 }], | ||
'keyword-spacing': [2, { before: true, after: true }], | ||
'no-trailing-spaces': 2, | ||
'no-var': 2, | ||
'object-shorthand': [2, 'always'], | ||
'one-var': [2, 'never'], | ||
'prefer-arrow-callback': 2, | ||
'prefer-const': [2, { destructuring: 'all' }], | ||
'quote-props': [2, 'as-needed'], | ||
semi: [2, 'always'], | ||
'space-before-blocks': [2, 'always'], | ||
|
||
// eslint:recommended overrides | ||
'no-cond-assign': 0, | ||
'no-inner-declarations': 0, | ||
'no-mixed-spaces-and-tabs': [2, 'smart-tabs'] | ||
}, | ||
|
||
plugins: ['@typescript-eslint'], | ||
|
||
extends: [ | ||
'eslint:recommended', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:import/typescript' | ||
// TODO: fix typerscript files | ||
// 'plugin:@typescript-eslint/recommended', | ||
], | ||
|
||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 9, | ||
sourceType: 'module', | ||
project: './tsconfig.json' | ||
}, | ||
|
||
env: { | ||
es6: true, | ||
browser: true, | ||
node: true, | ||
mocha: true | ||
} | ||
}; |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
*.svelte linguist-language=HTML | ||
* text=auto eol=lf | ||
*.svelte linguist-language=HTML |
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,9 @@ | ||
module.exports = { | ||
arrowParens: 'avoid', | ||
endOfLine: 'lf', | ||
quoteProps: 'as-needed', | ||
semi: true, | ||
singleQuote: true, | ||
trailingComma: 'none', | ||
useTabs: true | ||
}; |
Oops, something went wrong.