-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ESlint instead of TSlint (#7719)
Migrated TSlint configs to ESlint ones using [tslint-to-eslint-config](https://github.com/typescript-eslint/tslint-to-eslint-config) tool, and refined the configs to better match the current coding style. Changes: - [member-delimiter-style](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md#options) that as suggested default for type definition to be with `semicolon` - Indentation fixes that is enforced by [eslint-indent](https://eslint.org/docs/rules/indent#options) - Added dependencies for ESlint with Typescript - Removed TSlint
- Loading branch information
1 parent
9c501b5
commit a92a005
Showing
51 changed files
with
777 additions
and
699 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
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,191 @@ | ||
module.exports = { | ||
"env": { | ||
"es6": true, | ||
"node": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "tsconfig.json", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"eslint-plugin-import", | ||
"@typescript-eslint", | ||
"header" | ||
], | ||
"ignorePatterns": [ | ||
"**/bin/**/*.ts", | ||
"tests/automation/data/tcfg/*.ts", | ||
"tests/sxs_ts_3.6/*.ts", | ||
"tests/sxs_ts_latest/*.ts", | ||
], | ||
"rules": { | ||
"header/header": [ | ||
2, | ||
"line", | ||
[ | ||
{ | ||
"pattern": "Copyright \\d{4}-\\d{4}, Pulumi Corporation." | ||
} | ||
] | ||
], | ||
"@typescript-eslint/dot-notation": "off", | ||
"@typescript-eslint/explicit-member-accessibility": [ | ||
"off", | ||
{ | ||
"accessibility": "explicit" | ||
} | ||
], | ||
"@typescript-eslint/indent": [ | ||
"error", | ||
4, | ||
{ | ||
"FunctionDeclaration": { | ||
"parameters": "first" | ||
}, | ||
"FunctionExpression": { | ||
"parameters": "first" | ||
} | ||
} | ||
], | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
}, | ||
"singleline": { | ||
"delimiter": "semi", | ||
"requireLast": false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/member-ordering": [ | ||
"error", | ||
{ | ||
"default": [ | ||
"static-field", | ||
"instance-field", | ||
"static-method", | ||
"instance-method" | ||
] | ||
} | ||
], | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ | ||
"selector": "default", | ||
"format": null | ||
} | ||
], | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-inferrable-types": "off", | ||
"@typescript-eslint/no-parameter-properties": "off", | ||
"@typescript-eslint/no-require-imports": "off", | ||
"@typescript-eslint/no-shadow": [ | ||
"error", | ||
{ | ||
"hoist": "all" | ||
} | ||
], | ||
"@typescript-eslint/no-unused-expressions": "error", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/prefer-namespace-keyword": "error", | ||
"@typescript-eslint/quotes": [ | ||
"error", | ||
"double", | ||
{ | ||
"avoidEscape": true, | ||
"allowTemplateLiterals": true | ||
} | ||
], | ||
"@typescript-eslint/semi": [ | ||
"error" | ||
], | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"brace-style": "off", | ||
"comma-dangle": [ | ||
"error", | ||
"always-multiline" | ||
], | ||
"curly": "error", | ||
"default-case": "error", | ||
"dot-notation": "off", | ||
"eol-last": "error", | ||
"eqeqeq": [ | ||
"error", | ||
"smart" | ||
], | ||
"guard-for-in": "error", | ||
"id-blacklist": [ | ||
"error", | ||
"any", | ||
"Number", | ||
"number", | ||
"String", | ||
"string", | ||
"Boolean", | ||
"boolean", | ||
"Undefined", | ||
"undefined" | ||
], | ||
"id-match": "error", | ||
"import/order": "off", | ||
"indent": "off", | ||
"no-bitwise": "off", | ||
"no-caller": "error", | ||
"no-cond-assign": "off", | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": [ | ||
"log", | ||
"warn", | ||
"dir", | ||
"timeLog", | ||
"assert", | ||
"clear", | ||
"count", | ||
"countReset", | ||
"group", | ||
"groupEnd", | ||
"table", | ||
"dirxml", | ||
"error", | ||
"groupCollapsed", | ||
"Console", | ||
"profile", | ||
"profileEnd", | ||
"timeStamp", | ||
"context" | ||
] | ||
} | ||
], | ||
"no-debugger": "error", | ||
"no-empty": "error", | ||
"no-empty-function": "off", | ||
"no-eval": "error", | ||
"no-fallthrough": "error", | ||
"no-multiple-empty-lines": "off", | ||
"no-new-wrappers": "error", | ||
"no-redeclare": "off", | ||
"no-shadow": "off", | ||
"no-trailing-spaces": "error", | ||
"no-underscore-dangle": "off", | ||
"no-unused-expressions": "error", | ||
"no-unused-labels": "error", | ||
"no-use-before-define": "off", | ||
"no-var": "error", | ||
"prefer-const": "error", | ||
"quotes": "off", | ||
"radix": "error", | ||
"semi": "off", | ||
"spaced-comment": "off", | ||
"@typescript-eslint/no-redeclare": [ | ||
"error" | ||
] | ||
} | ||
}; |
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
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
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
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.