1+ {
2+ "extends" : [" semistandard" , " standard-jsx" ],
3+ "parserOptions" : {
4+ "ecmaVersion" : 12
5+ },
6+ "rules" : {
7+ /* These rules are incompatible with ES5. */
8+ "no-var" : " off" ,
9+ "object-shorthand" : " off" ,
10+ "prefer-const" : " off" ,
11+ "prefer-regex-literals" : " off" ,
12+
13+ /* These rules are compatible with ES5
14+ However they involve non-trivial code changes
15+ Therefore need more careful review before adopting. */
16+ "array-callback-return" : " off" ,
17+ "no-mixed-operators" : " off" ,
18+ "no-unreachable-loop" : " off" ,
19+ "no-useless-return" : " off" ,
20+ "prefer-promise-reject-errors" : " off" ,
21+
22+ /* These rules are compatible with ES5
23+ However they involve large-scale changes to the codebase, so
24+ careful co-ordination is needed in adopting the rule to avoid
25+ creating merge issues for other PRs. */
26+ "dot-notation" : " off" ,
27+ "indent" : " off" ,
28+ "no-multi-spaces" : " off" ,
29+ "no-unused-vars" : " off" ,
30+ "object-curly-spacing" : " off" ,
31+ "quote-props" : " off"
32+ },
33+ "overrides" : [
34+ {
35+ /* Code within /src is restricted to using ES5 JavaScript
36+ The exception is that ES6 classes are used sparingly - see exceptions below. */
37+ "files" : [" ./src/**/*.js" ],
38+
39+ "parserOptions" : {
40+ "sourceType" : " script" ,
41+ "ecmaVersion" : 5
42+ }
43+ },
44+ {
45+ /* These modules use ES6 classes, and so are parsed as ES6 to avoid errors. */
46+ "files" : [" ./src/core/**/a-*.js" ],
47+ "parserOptions" : {
48+ "ecmaVersion" : 6
49+ }
50+ },
51+ {
52+ /* This module use ES6 classes, and so is parsed as ES6 to avoid errors. */
53+ "files" : [" ./src/extras/primitives/primitives.js" ],
54+ "parserOptions" : {
55+ "ecmaVersion" : 6
56+ }
57+ },
58+ {
59+ /* This code is external, and the ES5 restrictions do not apply to it. */
60+ "files" : [" ./src/lib/**/*.js" ],
61+ "parserOptions" : {
62+ "sourceType" : " module" ,
63+ "ecmaVersion" : 12
64+ }
65+ }
66+ ]
67+ }
0 commit comments