forked from sveltejs/svelte
-
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.
Introduce ESLint to svelte sources (sveltejs#2958)
* introduce eslint * add lint npm script * first eslint run * use tsc stronger checks for unused vars * fix strict typescript unused checks * reintroduce unicode oddities * revert ordering changes * revert whitespace changes * set indent lint rule as error and ignore outliers * revert some more unicode * reintroduce scissors unicode again
- Loading branch information
1 parent
0dde4f5
commit caebe0d
Showing
98 changed files
with
1,442 additions
and
428 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,7 +1,3 @@ | ||
src/shared | ||
shared.js | ||
store.js | ||
test/test.js | ||
test/setup.js | ||
**/_actual.js | ||
**/expected.js | ||
**/expected.js | ||
test/*/samples/*/output.js |
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,43 +1,76 @@ | ||
{ | ||
"root": true, | ||
"rules": { | ||
"indent": [2, "tab", { "SwitchCase": 1 }], | ||
"semi": [2, "always"], | ||
"keyword-spacing": [2, { "before": true, "after": true }], | ||
"space-before-blocks": [2, "always"], | ||
"no-mixed-spaces-and-tabs": [2, "smart-tabs"], | ||
"no-cond-assign": 0, | ||
"no-unused-vars": 2, | ||
"object-shorthand": [2, "always"], | ||
"no-const-assign": 2, | ||
"no-class-assign": 2, | ||
"no-this-before-super": 2, | ||
"no-var": 2, | ||
"no-unreachable": 2, | ||
"valid-typeof": 2, | ||
"quote-props": [2, "as-needed"], | ||
"one-var": [2, "never"], | ||
"prefer-arrow-callback": 2, | ||
"prefer-const": [2, { "destructuring": "all" }], | ||
"arrow-spacing": 2, | ||
"no-inner-declarations": 0 | ||
}, | ||
"env": { | ||
"es6": true, | ||
"browser": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 9, | ||
"sourceType": "module" | ||
}, | ||
"settings": { | ||
"import/core-modules": ["svelte"] | ||
} | ||
"root": true, | ||
"rules": { | ||
"indent": "off", | ||
"no-unused-vars": "off", | ||
"semi": [2, "always"], | ||
"keyword-spacing": [2, { "before": true, "after": true }], | ||
"space-before-blocks": [2, "always"], | ||
"no-mixed-spaces-and-tabs": [2, "smart-tabs"], | ||
"no-cond-assign": 0, | ||
"object-shorthand": [2, "always"], | ||
"no-const-assign": 2, | ||
"no-class-assign": 2, | ||
"no-this-before-super": 2, | ||
"no-var": 2, | ||
"no-unreachable": 2, | ||
"valid-typeof": 2, | ||
"quote-props": [2, "as-needed"], | ||
"one-var": [2, "never"], | ||
"prefer-arrow-callback": 2, | ||
"prefer-const": [2, { "destructuring": "all" }], | ||
"arrow-spacing": 2, | ||
"no-inner-declarations": 0, | ||
"@typescript-eslint/indent": ["error", "tab", { | ||
"SwitchCase": 1, | ||
"ignoredNodes": ["TemplateLiteral"] | ||
}], | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/array-type": ["error", "array-simple"], | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/explicit-member-accessibility": "off", | ||
"@typescript-eslint/no-unused-vars": ["error", { | ||
"argsIgnorePattern": "^_" | ||
}], | ||
"@typescript-eslint/no-object-literal-type-assertion": ["error", { | ||
"allowAsParameter": true | ||
}], | ||
"@typescript-eslint/no-unused-vars": "off" | ||
}, | ||
"env": { | ||
"es6": true, | ||
"browser": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings", | ||
"plugin:import/typescript", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 9, | ||
"sourceType": "module" | ||
}, | ||
"settings": { | ||
"import/core-modules": [ | ||
"svelte", | ||
"svelte/internal", | ||
"svelte/store", | ||
"svelte/easing", | ||
"estree" | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.js"], | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": "off" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.