-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Upgrade eslint to latest toolchain (#437)
* feat: Upgrade eslint to latest toolchain * feat: Upgrade prettier to latest toolchain * feat: Upgrade typescript to latest toolchain * typescript-eslint@6.14.0 * eslint-config-uber-* vendored as local deps * bump eslint-plugin-import * CI: run tes on node 18 --------- Co-authored-by: Zbigniew Zagórski <zbigniew@cartodb.com>
- Loading branch information
Showing
24 changed files
with
978 additions
and
353 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 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
10 changes: 10 additions & 0 deletions
10
modules/dev-tools/src/configuration/eslint-config-uber-es2015/best-practices.json
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,10 @@ | ||
{ | ||
"rules": { | ||
"accessor-pairs": [ | ||
2, | ||
{ | ||
"getWithoutSet": true | ||
} | ||
] | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
modules/dev-tools/src/configuration/eslint-config-uber-es2015/ecmascript-6.json
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,41 @@ | ||
{ | ||
"rules": { | ||
"no-class-assign": 2, | ||
"arrow-spacing": [ | ||
1, | ||
{ | ||
"before": true, | ||
"after": true | ||
} | ||
], | ||
"no-const-assign": 2, | ||
"no-dupe-class-members": 2, | ||
"no-this-before-super": 2, | ||
"no-var": 2, | ||
"prefer-arrow-callback": 0, | ||
"prefer-const": 2, | ||
"prefer-spread": 2, | ||
"prefer-template": 2, | ||
"arrow-parens": 0, | ||
"arrow-spacing": [ | ||
2, | ||
{ | ||
"before": true, | ||
"after": true | ||
} | ||
], | ||
"constructor-super": 2, | ||
"generator-star-spacing": [ | ||
2, | ||
{ | ||
"before": false, | ||
"after": true | ||
} | ||
], | ||
"object-shorthand": [ | ||
2, | ||
"always" | ||
], | ||
"require-yield": 2 | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
modules/dev-tools/src/configuration/eslint-config-uber-es2015/eslintrc.cjs
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,38 @@ | ||
// Copyright (c) 2016 Uber Technologies, Inc. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
module.exports = { | ||
extends: [ | ||
'./best-practices.json', | ||
'./ecmascript-6.json', | ||
'./miscellaneous.json', | ||
'./stylistic-issues.json', | ||
'../eslint-config-uber-es5/eslintrc.cjs' | ||
], | ||
env: { | ||
es6: true | ||
}, | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
experimentalObjectRestSpread: true | ||
} | ||
} | ||
}; |
5 changes: 5 additions & 0 deletions
5
modules/dev-tools/src/configuration/eslint-config-uber-es2015/miscellaneous.json
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": { | ||
"prefer-reflect": 0 | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
modules/dev-tools/src/configuration/eslint-config-uber-es2015/stylistic-issues.json
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,29 @@ | ||
{ | ||
"rules": { | ||
"no-continue": 2, | ||
"func-style": [ | ||
2, | ||
"declaration", | ||
{ | ||
"allowArrowFunctions": true | ||
} | ||
], | ||
"lines-around-comment": [ | ||
0, | ||
{ | ||
"beforeBlockComment": true, | ||
"afterBlockComment": false, | ||
"beforeLineComment": false, | ||
"afterLineComment": false, | ||
"allowBlockStart": true, | ||
"allowBlockEnd": true | ||
} | ||
], | ||
"quote-props": [ | ||
2, | ||
"as-needed" | ||
], | ||
"sort-vars": 2, | ||
"wrap-regex": 2 | ||
} | ||
} |
81 changes: 81 additions & 0 deletions
81
modules/dev-tools/src/configuration/eslint-config-uber-es5/best-practices.json
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,81 @@ | ||
{ | ||
"rules": { | ||
"no-alert": 2, | ||
"no-caller": 2, | ||
"no-div-regex": 2, | ||
"no-else-return": 2, | ||
"no-eq-null": 2, | ||
"no-extend-native": 2, | ||
"no-labels": 2, | ||
"no-eval": 2, | ||
"no-extra-bind": 2, | ||
"no-fallthrough": 2, | ||
"no-floating-decimal": 2, | ||
"no-implicit-coercion": 2, | ||
"no-implied-eval": 2, | ||
"no-invalid-this": 2, | ||
"no-iterator": 2, | ||
"no-lone-blocks": 2, | ||
"no-loop-func": 2, | ||
"no-multi-spaces": 2, | ||
"no-multi-str": 2, | ||
"no-new": 2, | ||
"no-new-func": 2, | ||
"no-new-wrappers": 2, | ||
"no-octal": 2, | ||
"no-octal-escape": 2, | ||
"no-param-reassign": 0, | ||
"no-proto": 2, | ||
"no-redeclare": 2, | ||
"no-return-assign": 2, | ||
"no-script-url": 2, | ||
"no-self-compare": 2, | ||
"no-sequences": 2, | ||
"no-throw-literal": 2, | ||
"no-unused-expressions": 2, | ||
"no-useless-call": 2, | ||
"no-void": 1, | ||
"no-warning-comments": [ | ||
0, | ||
{ | ||
"terms": [ | ||
"todo", | ||
"fixme", | ||
"xxx" | ||
], | ||
"location": "start" | ||
} | ||
], | ||
"no-with": 2, | ||
"block-scoped-var": 2, | ||
"complexity": [ | ||
2, | ||
11 | ||
], | ||
"consistent-return": 2, | ||
"curly": [ | ||
2, | ||
"all" | ||
], | ||
"default-case": 2, | ||
"dot-location": [ | ||
2, | ||
"property" | ||
], | ||
"dot-notation": [ | ||
2, | ||
{ | ||
"allowKeywords": true | ||
} | ||
], | ||
"eqeqeq": 2, | ||
"guard-for-in": 2, | ||
"radix": 2, | ||
"vars-on-top": 0, | ||
"wrap-iife": 2, | ||
"yoda": [ | ||
2, | ||
"never" | ||
] | ||
} | ||
} |
115 changes: 115 additions & 0 deletions
115
modules/dev-tools/src/configuration/eslint-config-uber-es5/errors.cjs
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,115 @@ | ||
// Copyright (c) 2016 Uber Technologies, Inc. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
// These rules relate to possible syntax or logic errors | ||
// Categorized as "errors" here: http://eslint.org/docs/rules/ | ||
module.exports = { | ||
rules: { | ||
/** | ||
* Possible Errors Section from http://eslint.org/docs/rules/: | ||
*/ | ||
|
||
// http://eslint.org/docs/rules/no-cond-assign | ||
'no-cond-assign': 2, | ||
|
||
// http://eslint.org/docs/rules/no-constant-condition | ||
'no-constant-condition': 2, | ||
|
||
// http://eslint.org/docs/rules/no-console | ||
// highly agreed upon | ||
'no-console': 2, | ||
|
||
// http://eslint.org/docs/rules/no-control-regex | ||
'no-control-regex': 2, | ||
|
||
// http://eslint.org/docs/rules/no-debugger | ||
// highly agreed upon | ||
'no-debugger': 2, | ||
|
||
// http://eslint.org/docs/rules/no-dupe-args | ||
'no-dupe-args': 2, | ||
|
||
// http://eslint.org/docs/rules/no-dupe-keys | ||
'no-dupe-keys': 2, | ||
|
||
// http://eslint.org/docs/rules/no-duplicate-case | ||
'no-duplicate-case': 2, | ||
|
||
// http://eslint.org/docs/rules/no-empty-character-class | ||
'no-empty-character-class': 2, | ||
|
||
// http://eslint.org/docs/rules/no-empty | ||
// highly agreed upon | ||
'no-empty': 2, | ||
|
||
// http://eslint.org/docs/rules/no-ex-assign | ||
// abnormal behavior in ie 6-8 | ||
'no-ex-assign': 2, | ||
|
||
// http://eslint.org/docs/rules/no-extra-boolean-cast | ||
// highly agreed upon | ||
'no-extra-boolean-cast': 2, | ||
|
||
// http://eslint.org/docs/rules/no-extra-parens | ||
'no-extra-parens': [2, 'functions'], | ||
|
||
// http://eslint.org/docs/rules/no-extra-semi | ||
// highly agreed upon | ||
'no-extra-semi': 2, | ||
|
||
// http://eslint.org/docs/rules/no-func-assign | ||
'no-func-assign': 2, | ||
|
||
// http://eslint.org/docs/rules/no-inner-declarations | ||
'no-inner-declarations': [2, 'functions'], | ||
|
||
'no-invalid-regexp': 2, | ||
|
||
'no-irregular-whitespace': 2, | ||
|
||
'no-obj-calls': 2, | ||
|
||
// http://eslint.org/docs/rules/no-prototype-builtins | ||
'no-prototype-builtins': 0, | ||
|
||
'no-regex-spaces': 2, | ||
|
||
'no-sparse-arrays': 2, | ||
|
||
// http://eslint.org/docs/rules/no-template-curly-in-string | ||
'no-template-curly-in-string': 2, | ||
|
||
'no-unexpected-multiline': 2, | ||
|
||
'no-unreachable': 2, | ||
|
||
// http://eslint.org/docs/rules/no-unsafe-finally | ||
'no-unsafe-finally': 2, | ||
|
||
// http://eslint.org/docs/rules/no-unsafe-negation | ||
'no-unsafe-negation': 2, | ||
|
||
'use-isnan': 2, | ||
|
||
'valid-jsdoc': 0, | ||
|
||
'valid-typeof': 2 | ||
} | ||
}; |
Oops, something went wrong.