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: make trailing commas consistent in .eslintrc #25739

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ module.exports = {
// start with something that looks like a variable name or code.
ignorePattern: '^.{0,50}$|^ [a-z]+ ?[0-9A-Z_.(/=:[#-]',
ignoreInlineComments: true,
ignoreConsecutiveComments: true
ignoreConsecutiveComments: true,
},
block: {
ignorePattern: '.*'
}
ignorePattern: '.*',
},
}],
'comma-dangle': ['error', 'only-multiline'],
'comma-spacing': 'error',
Expand Down Expand Up @@ -168,27 +168,27 @@ module.exports = {
{
property: '__defineSetter__',
message: '__defineSetter__ is deprecated.',
}
},
],
// If this list is modified, please copy the change to lib/.eslintrc.yaml
// and test/.eslintrc.yaml.
'no-restricted-syntax': [
'error',
{
selector: "CallExpression[callee.object.name='assert'][callee.property.name='deepStrictEqual'][arguments.2.type='Literal']",
message: 'Do not use a literal for the third argument of assert.deepStrictEqual()'
message: 'Do not use a literal for the third argument of assert.deepStrictEqual()',
},
{
selector: "CallExpression[callee.object.name='assert'][callee.property.name='doesNotThrow']",
message: 'Please replace `assert.doesNotThrow()` and add a comment next to the code instead.'
message: 'Please replace `assert.doesNotThrow()` and add a comment next to the code instead.',
},
{
selector: "CallExpression[callee.object.name='assert'][callee.property.name='rejects'][arguments.length<2]",
message: '`assert.rejects()` must be invoked with at least two arguments.',
},
{
selector: "CallExpression[callee.object.name='assert'][callee.property.name='strictEqual'][arguments.2.type='Literal']",
message: 'Do not use a literal for the third argument of assert.strictEqual()'
message: 'Do not use a literal for the third argument of assert.strictEqual()',
},
{
selector: "CallExpression[callee.object.name='assert'][callee.property.name='throws'][arguments.1.type='Literal']:not([arguments.1.regex])",
Expand All @@ -209,7 +209,7 @@ module.exports = {
{
selector: 'ThrowStatement > CallExpression[callee.name=/Error$/]',
message: 'Use `new` keyword when throwing an `Error`.',
}
},
],
/* eslint-enable max-len */
'no-return-await': 'error',
Expand Down Expand Up @@ -263,7 +263,7 @@ module.exports = {
'space-unary-ops': 'error',
'spaced-comment': ['error', 'always', {
'block': { 'balanced': true },
'exceptions': ['-']
'exceptions': ['-'],
}],
'strict': ['error', 'global'],
'symbol-description': 'error',
Expand Down