Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: update eslint #27670

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ module.exports = {
tabWidth: 2,
}],
'new-parens': 'error',
'no-async-promise-executor': 'error',
'no-class-assign': 'error',
'no-confusing-arrow': 'error',
'no-const-assign': 'error',
Expand Down Expand Up @@ -147,7 +148,7 @@ module.exports = {
'no-octal': 'error',
'no-path-concat': 'error',
'no-proto': 'error',
'no-redeclare': 'error',
'no-redeclare': ['error', { 'builtinGlobals': false }],
'no-restricted-modules': ['error', 'sys'],
/* eslint-disable max-len */
'no-restricted-properties': [
Expand Down Expand Up @@ -246,6 +247,7 @@ module.exports = {
'no-return-await': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-shadow-restricted-names': 'error',
'no-tabs': 'error',
'no-template-curly-in-string': 'error',
'no-this-before-super': 'error',
Expand Down
9 changes: 5 additions & 4 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,22 +218,23 @@ or be removed in the future.

To avoid these cases, any builtin function overrides should be defined upfront:

<!-- eslint-disable no-redeclare -->
```js
const o = {};
// THROWS: Cannot assign read only property 'toString' of object
o.toString = () => 'string';

// OK
const o = { toString: () => 'string' };

class X {
constructor() {
this.toString = () => 'string';
}
}
// THROWS: Cannot assign read only property 'toString' of object
new X();
```

```js
// OK
const o = { toString: () => 'string' };
BridgeAR marked this conversation as resolved.
Show resolved Hide resolved

class X {
toString = undefined;
Expand Down
5 changes: 3 additions & 2 deletions tools/lint-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const rulesDirs = ['tools/eslint-rules'];
const extensions = ['.js', '.md'];
// This is the maximum number of files to be linted per worker at any given time
const maxWorkload = 40;
const maxWorkload = 60;

const cluster = require('cluster');
const path = require('path');
Expand Down Expand Up @@ -35,7 +35,8 @@ if (cluster.isMaster) {
let curPath = 'Starting ...';
let showProgress = true;
const globOptions = {
nodir: true
nodir: true,
ignore: '**/node_modules/**/*'
};
const workerConfig = {};
let startTime;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading