Skip to content

Commit 463f664

Browse files
author
Ray Schamp
committed
fix(base): Update rules for scratch-vm
Adjustments to the rules made while linting scratch-vm TODO-style comments now warn. Trailing commas are explicitly not allowed (previously assumed this rule was in effect with eslint/recommended).
1 parent e00a121 commit 463f664

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

index.js

+11-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ module.exports = {
22
parser: 'babel-eslint',
33
rules: {
44
// Errors
5-
'valid-jsdoc': [2],
5+
'valid-jsdoc': [2, {
6+
prefer: {
7+
return: 'return'
8+
},
9+
requireReturn: false
10+
}],
611

712
// Best practices
813
'array-callback-return': [1],
@@ -46,7 +51,9 @@ module.exports = {
4651
'no-useless-call': [2],
4752
'no-useless-concat': [1],
4853
'no-useless-escape': [2],
49-
'no-warning-comments': [1],
54+
'no-warning-comments': [1, {
55+
location: 'anywhere'
56+
}],
5057
'no-with': [2],
5158
'radix': [2],
5259
'wrap-iife': [2],
@@ -65,6 +72,7 @@ module.exports = {
6572
// Style
6673
'brace-style': [2],
6774
'camelcase': [2],
75+
'comma-dangle': [2, 'never'],
6876
'func-style': [2, 'expression'],
6977
'indent': [2, 4],
7078
'jsx-quotes': [2, 'prefer-double'],
@@ -78,13 +86,6 @@ module.exports = {
7886
after: true
7987
}],
8088
'linebreak-style': [2, 'unix'],
81-
'lines-around-comment': [2, {
82-
allowArrayStart: true,
83-
allowBlockStart: true,
84-
allowObjectStart: true,
85-
beforeBlockComment: true,
86-
beforeLineComment: true
87-
}],
8889
'max-len': [2, 120, 4],
8990
'new-parens': [2],
9091
'newline-per-chained-call': [2],
@@ -95,10 +96,7 @@ module.exports = {
9596
maxBOF: 0,
9697
maxEOF: 0
9798
}],
98-
'no-negated-condition': [2],
99-
'no-plusplus': [2, {
100-
allowForLoopAfterthoughts: true
101-
}],
99+
'no-negated-condition': [1],
102100
'no-tabs': [2],
103101
'no-trailing-spaces': [2, { skipBlankLines: true }],
104102
'no-unneeded-ternary': [2],

0 commit comments

Comments
 (0)