Skip to content

Commit ad20669

Browse files
committed
Reveting changes to configuration files as per jsdom/whatwg-encoding#issuecomment-605658333
1 parent 927948b commit ad20669

File tree

8 files changed

+32
-379
lines changed

8 files changed

+32
-379
lines changed

.eslintrc.json

Lines changed: 16 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@
99
},
1010
"rules": {
1111
// Possible errors
12-
"for-direction": "error",
13-
"getter-return": "error",
14-
"no-await-in-loop": "error",
15-
"no-compare-neg-zero": "error",
12+
"comma-dangle": ["error", "never"],
1613
"no-cond-assign": ["error", "except-parens"],
1714
"no-console": "error",
18-
"no-constant-condition": ["error", { "checkLoops": false }],
15+
"no-constant-condition": "off",
1916
"no-control-regex": "off",
2017
"no-debugger": "error",
2118
"no-dupe-args": "error",
@@ -31,15 +28,13 @@
3128
"no-inner-declarations": "off",
3229
"no-invalid-regexp": "error",
3330
"no-irregular-whitespace": "error",
31+
"no-negated-in-lhs": "error",
3432
"no-obj-calls": "error",
35-
"no-prototype-builtins": "error",
3633
"no-regex-spaces": "error",
3734
"no-sparse-arrays": "error",
38-
"no-template-curly-in-string": "error",
3935
"no-unexpected-multiline": "error",
4036
"no-unreachable": "error",
4137
"no-unsafe-finally": "off",
42-
"no-unsafe-negation": "error",
4338
"use-isnan": "error",
4439
"valid-jsdoc": "off",
4540
"valid-typeof": "error",
@@ -48,7 +43,6 @@
4843
"accessor-pairs": "error",
4944
"array-callback-return": "error",
5045
"block-scoped-var": "off",
51-
"class-methods-use-this": "off",
5246
"complexity": "off",
5347
"consistent-return": "error",
5448
"curly": ["error", "all"],
@@ -62,7 +56,7 @@
6256
"no-case-declarations": "error",
6357
"no-div-regex": "off",
6458
"no-else-return": "error",
65-
"no-empty-function": "off",
59+
"no-empty-function": "error",
6660
"no-empty-pattern": "error",
6761
"no-eq-null": "error",
6862
"no-eval": "error",
@@ -71,18 +65,18 @@
7165
"no-extra-label": "error",
7266
"no-fallthrough": "error",
7367
"no-floating-decimal": "error",
74-
"no-global-assign": "error",
7568
"no-implicit-coercion": "error",
7669
"no-implicit-globals": "error",
77-
"no-implied-eval": "off",
78-
"no-invalid-this": "off", // meh
70+
"no-implied-eval": "error",
71+
"no-invalid-this": "error",
7972
"no-iterator": "error",
8073
"no-labels": ["error", { "allowLoop": true }],
8174
"no-lone-blocks": "error",
8275
"no-loop-func": "off",
8376
"no-magic-numbers": "off",
8477
"no-multi-spaces": "error",
8578
"no-multi-str": "error",
79+
"no-native-reassign": "error",
8680
"no-new": "error",
8781
"no-new-func": "error",
8882
"no-new-wrappers": "error",
@@ -92,9 +86,7 @@
9286
"no-process-env": "error",
9387
"no-proto": "error",
9488
"no-redeclare": "error",
95-
"no-restricted-properties": "off",
9689
"no-return-assign": ["error", "except-parens"],
97-
"no-return-await": "error",
9890
"no-script-url": "off",
9991
"no-self-assign": "error",
10092
"no-self-compare": "error",
@@ -106,13 +98,10 @@
10698
"no-useless-call": "error",
10799
"no-useless-concat": "error",
108100
"no-useless-escape": "error",
109-
"no-useless-return": "error",
110101
"no-void": "error",
111102
"no-warning-comments": "off",
112103
"no-with": "error",
113-
"prefer-promise-reject-errors": "error",
114104
"radix": ["error", "as-needed"],
115-
"require-await": "error",
116105
"vars-on-top": "off",
117106
"wrap-iife": ["error", "outside"],
118107
"yoda": ["error", "never"],
@@ -138,111 +127,84 @@
138127
"callback-return": "off",
139128
"global-require": "error",
140129
"handle-callback-err": "error",
141-
"no-buffer-constructor": "error",
142130
"no-mixed-requires": ["error", true],
143131
"no-new-require": "error",
144132
"no-path-concat": "error",
145133
"no-process-exit": "error",
134+
"no-restricted-imports": "off",
146135
"no-restricted-modules": "off",
147136
"no-sync": "off",
148137

149138
// Stylistic Issues
150-
"array-bracket-newline": ["error", { "multiline": true }],
151139
"array-bracket-spacing": ["error", "never"],
152-
"array-element-newline": ["off"],
153140
"block-spacing": ["error", "always"],
154141
"brace-style": ["error", "1tbs", { "allowSingleLine": false }],
155142
"camelcase": ["error", { "properties": "always" }],
156-
"capitalized-comments": "off",
157-
"comma-dangle": ["error", "never"],
158143
"comma-spacing": ["error", { "before": false, "after": true }],
159144
"comma-style": ["error", "last"],
160145
"computed-property-spacing": ["error", "never"],
161146
"consistent-this": "off",
162147
"eol-last": "error",
163-
"func-call-spacing": ["error", "never"],
164-
"func-name-matching": ["error"],
165148
"func-names": "off",
166149
"func-style": ["error", "declaration"],
167-
"function-paren-newline": ["error", "multiline"],
168150
"id-blacklist": "off",
169151
"id-length": "off",
170152
"id-match": "off",
171-
"indent": ["error", 2, { "SwitchCase": 1, "CallExpression": {"arguments": "first"}, "FunctionExpression": {"parameters": "first"}, "ignoredNodes": ["ConditionalExpression"] }],
153+
"indent": ["error", 2, { "SwitchCase": 1 }],
172154
"jsx-quotes": "off",
173155
"key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "strict" }],
174156
"keyword-spacing": ["error", { "before": true, "after": true }],
175-
"line-comment-position": "off",
176157
"linebreak-style": ["error", "unix"],
177158
"lines-around-comment": "off",
178159
"max-depth": "off",
179160
"max-len": ["error", 120, { "ignoreUrls": true }],
180-
"max-lines": "off",
181161
"max-nested-callbacks": "off",
182162
"max-params": "off",
183163
"max-statements": "off",
184164
"max-statements-per-line": ["error", { "max": 1 }],
185-
"multiline-ternary": ["error", "always-multiline"],
186-
"new-cap": ["error", { "capIsNewExceptions": ["ByteString", "USVString", "DOMString"] }],
165+
"new-cap": ["error", { "capIsNewExceptions": ["USVString"] }],
187166
"new-parens": "error",
167+
"newline-after-var": "off",
168+
"newline-before-return": "off",
188169
"newline-per-chained-call": "off",
189170
"no-array-constructor": "error",
190171
"no-bitwise": "off",
191172
"no-continue": "off",
192173
"no-inline-comments": "off",
193174
"no-lonely-if": "error",
194-
"no-mixed-operators": [
195-
"error",
196-
{
197-
"groups": [
198-
["&", "|", "^", "~", "<<", ">>", ">>>"],
199-
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
200-
["&&", "||"],
201-
["in", "instanceof"]
202-
]
203-
}
204-
],
205175
"no-mixed-spaces-and-tabs": "error",
206-
"no-multi-assign": "off",
207176
"no-multiple-empty-lines": "error",
208177
"no-negated-condition": "off",
209178
"no-nested-ternary": "error",
210179
"no-new-object": "error",
211180
"no-plusplus": "off",
212181
"no-restricted-syntax": "off",
213-
"no-tabs": "error",
182+
"no-spaced-func": "error",
214183
"no-ternary": "off",
215184
"no-trailing-spaces": "error",
216185
"no-underscore-dangle": "off",
217186
"no-unneeded-ternary": "error",
218187
"no-whitespace-before-property": "error",
219-
"nonblock-statement-body-position": "error",
220-
"object-curly-newline": ["error", { "consistent": true }],
221188
"object-curly-spacing": ["error", "always"],
222189
"object-property-newline": "off",
223190
"one-var": ["error", "never"],
224191
"one-var-declaration-per-line": ["error", "initializations"],
225192
"operator-assignment": ["error", "always"],
226193
"operator-linebreak": ["error", "after"],
227194
"padded-blocks": ["error", "never"],
228-
"padding-line-between-statements": "off",
229195
"quote-props": ["error", "as-needed"],
230196
"quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
231197
"require-jsdoc": "off",
232198
"semi": ["error", "always"],
233199
"semi-spacing": "error",
234-
"semi-style": "error",
235-
"sort-keys": "off",
200+
"sort-imports": "off",
236201
"sort-vars": "off",
237202
"space-before-blocks": ["error", "always"],
238203
"space-before-function-paren": ["error", { "anonymous": "always", "named": "never" }],
239204
"space-in-parens": ["error", "never"],
240205
"space-infix-ops": "error",
241206
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
242207
"spaced-comment": ["error", "always", { "markers": ["///"] }],
243-
"switch-colon-spacing": "error",
244-
"template-tag-spacing": "error",
245-
"unicode-bom": "error",
246208
"wrap-regex": "off",
247209

248210
// ECMAScript 6
@@ -257,24 +219,18 @@
257219
"no-dupe-class-members": "error",
258220
"no-duplicate-imports": "error",
259221
"no-new-symbol": "error",
260-
"no-restricted-imports": "off",
261222
"no-this-before-super": "error",
262223
"no-useless-computed-key": "error",
263224
"no-useless-constructor": "error",
264-
"no-useless-rename": "error",
265225
"no-var": "error",
266226
"object-shorthand": "error",
267227
"prefer-arrow-callback": "error",
268228
"prefer-const": ["error", { "ignoreReadBeforeAssign": true }],
269-
"prefer-destructuring": ["error", { "VariableDeclarator": { "array": false, "object": true }, "AssignmentExpression": { "array": false, "object": false } }, { "enforceForRenamedProperties": false }],
270-
"prefer-numeric-literals": "error",
229+
"prefer-reflect": "off",
271230
"prefer-rest-params": "off",
272-
"prefer-spread": "error",
231+
"prefer-spread": "off", // TODO with new Node versions
273232
"prefer-template": "off",
274233
"require-yield": "error",
275-
"rest-spread-spacing": "error",
276-
"sort-imports": "off",
277-
"symbol-description": "error",
278234
"template-curly-spacing": ["error", "never"],
279235
"yield-star-spacing": ["error", "after"]
280236
}

.gitignore

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
# node specific
2-
node_modules/
3-
npm-debug.log
1+
/node_modules/
2+
/npm-debug.log
43

5-
# project specific
6-
coverage/
7-
test/web-platform-tests/
8-
lib/*.json
9-
lib/TextEncoder.js
10-
lib/TextDecoder.js
11-
lib/TextDecodeOptions.js
12-
lib/TextDecoderOptions.js
13-
lib/utils.js
14-
live-viewer/whatwg-encoding.js
15-
out/
4+
/coverage/
5+
/test/web-platform-tests/
6+
/lib/*.json
7+
/lib/TextEncoder.js
8+
/lib/TextDecoder.js
9+
/lib/TextDecodeOptions.js
10+
/lib/TextDecoderOptions.js
11+
/lib/utils.js
12+
/live-viewer/whatwg-encoding.js

.travis.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
1-
branches:
2-
only:
3-
- master
4-
51
language: node_js
62
node_js:
7-
- 10
8-
- 12
93
- stable
10-
114
script:
12-
- npm run lint
13-
- npm test
14-
15-
notifications:
16-
email:
17-
on_success: never
18-
on_failure: always
5+
npm run lint && npm test

LICENSE.txt

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
The MIT License (MIT)
1+
Copyright © 2016–2018 Domenic Denicola <[email protected]>
22

3-
Copyright (c) 2016–2018 Domenic Denicola <[email protected]>
3+
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:
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
116

12-
The above copyright notice and this permission notice shall be included in
13-
all copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
7+
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.

live-viewer/.eslintrc.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

live-viewer/index.html

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)