-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* ESLint updates and linting cleanup * Exclude test files from some linting rules for now * Fix some TypeScript and build issues
- Loading branch information
1 parent
a917965
commit 4d3189c
Showing
68 changed files
with
449 additions
and
442 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,63 @@ | ||
module.exports = { | ||
'parser': '@typescript-eslint/parser', | ||
'extends': 'eslint:recommended', | ||
'parserOptions': { | ||
'ecmaVersion': 2018, | ||
'sourceType': 'module' | ||
}, | ||
'plugins': ['@typescript-eslint'], | ||
'env': { | ||
'browser': true, | ||
'node': true, | ||
'mocha': true | ||
}, | ||
'globals': {}, | ||
'rules': { | ||
indent: ['error', 4, { | ||
SwitchCase: 1 | ||
}], | ||
'no-empty': ['error', { 'allowEmptyCatch': true }], | ||
quotes: ['error', 'single', { | ||
avoidEscape: true | ||
}], | ||
/** | ||
* The codebase uses some while(true) statements. | ||
* Refactor to remove this rule. | ||
*/ | ||
'no-constant-condition': 0, | ||
/** | ||
* Less combines assignments with conditionals sometimes | ||
*/ | ||
'no-cond-assign': 0, | ||
/** | ||
* @todo - remove when some kind of code style (XO?) is added | ||
*/ | ||
'no-multiple-empty-lines': 'error' | ||
}, | ||
'overrides': [ | ||
{ | ||
files: ['*.ts'], | ||
extends: ['plugin:@typescript-eslint/recommended'], | ||
rules: { | ||
/** | ||
* Suppress until Less has better-defined types | ||
* @see https://github.com/less/less.js/discussions/3786 | ||
*/ | ||
'@typescript-eslint/no-explicit-any': 0 | ||
} | ||
}, | ||
{ | ||
files: ['test/**/*.{js,ts}', 'benchmark/index.js'], | ||
/** | ||
* @todo - fix later | ||
*/ | ||
rules: { | ||
'no-undef': 0, | ||
'no-useless-escape': 0, | ||
'no-unused-vars': 0, | ||
'no-redeclare': 0, | ||
'@typescript-eslint/no-unused-vars': 0 | ||
} | ||
}, | ||
] | ||
} |
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
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.