-
-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace tslint with eslint to lint mocha tests (#590)
* chore: re-add eslint to lint mocha tests * Upgrade typescript-eslint-parser to ^22 * Update tools/ to conform to eslint-config-airbnb * Fix some ESLint warnings for async-ora * Fix ESLint warnings for types * Fix ESLint warnings for web-multi-logger * Fix ESLint warnings for cli * Add eslint-config-airbnb & eslint-plugin-typescript * Apparently you can't DRY up commander directives * Use the new typescript-eslint scoped packages * Explicitly adding the parser is no longer necessary * Fix ESLint warnings for deb * Fix ESLint warnings for rpm * Fix ESLint warnings for snap * Fix ESLint warnings for flatpak * Fix ESLint warnings for maker-base * Fix ESLint warnings for maker-zip * Fix ESLint warnings for maker-pkg * Fix ESLint warnings for maker-dmg * Fix ESLint warnings for maker-squirrel * Fix ESLint warnings for maker-wix * Fix ESLint warnings for maker-appx * Use no-unused-vars for Typescript as directed * Fix ESLint warnings for core * Fix ESLint warnings for publisher modules * Fix ESLint warnings for plugin modules * Fix ESLint warnings for installer modules * Drop tslint * Fix typings * Remove unused import * Ignore empty constructors * Upgrade typescript-eslint packages * Disable class-methods-use-this rule globally * Remove bare eslint-disable-line directives * Upgrade eslint & friends * Fix linting errors * Fix yarn.lock * Stop making @types/webpack out of sync * chore: drop @types/ora, typings are bundled * Fix TypeScript errors * Fix no-unresolved lint errors on Windows * Ignore camelcase instances that are part of the GitHub API * Ignore import/no-cycle rules * Make SinonStub more specific * Fix forgeConfigIsValidFilePath * Reel it in
- Loading branch information
1 parent
8e062e6
commit 7af36d5
Showing
127 changed files
with
1,871 additions
and
1,216 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,4 @@ | ||
dist | ||
node_modules | ||
*.d.ts | ||
packages/*/*/index.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,74 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 8, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"mocha", | ||
"@typescript-eslint" | ||
], | ||
"env": { | ||
"mocha": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"airbnb" | ||
], | ||
"rules": { | ||
"class-methods-use-this": "off", | ||
"import/no-cycle": "off", | ||
"import/no-extraneous-dependencies": ["error", { "devDependencies": ["packages/**/test/**/*_spec.ts"] }], | ||
"mocha/no-exclusive-tests": "error", | ||
"no-await-in-loop": "off", | ||
"no-param-reassign": "off", | ||
"no-restricted-syntax": [ | ||
"error", | ||
{ | ||
"selector": "ForInStatement", | ||
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array." | ||
}, | ||
{ | ||
"selector": "LabeledStatement", | ||
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand." | ||
}, | ||
{ | ||
"selector": "WithStatement", | ||
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize." | ||
} | ||
], | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-this-alias": ["error", { | ||
"allowDestructuring": true | ||
}], | ||
"@typescript-eslint/no-unused-vars": ["error", { | ||
"args": "after-used", | ||
"argsIgnorePattern": "^_", | ||
"ignoreRestSiblings": true, | ||
"vars": "all" | ||
}] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["packages/*/*/test/**/*_spec*.ts"], | ||
"rules": { | ||
"global-require": "off", | ||
"import/no-dynamic-require": "off" | ||
} | ||
} | ||
], | ||
"settings": { | ||
"import/extensions": [ | ||
".js", | ||
".ts" | ||
], | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts"] | ||
}, | ||
"import/resolver": { | ||
"node": { | ||
"extensions": [".js", ".json", ".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
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,5 @@ | ||
{ | ||
"rules": { | ||
"no-console": "off" | ||
} | ||
} |
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.