Skip to content

Commit 4778ae8

Browse files
authoredMar 4, 2024··
feat: Update ES Syntax (#189)
* chore: Add all es-x rules to es-syntax.json * chore: Add a couple of missing syntax 🤔 * chore: #json comments * chore: Attempt (part 1) of simplifying es-syntax * chore: Add "test:mocha" to be able to run tests on one file faster * chore: Updates to the es-syntax.json * feat: Re-add support for strict mode * chore: Update all tests to support "not-supported-till" * fix: strip "no-" prefix from es-x rule ids * chore: remove useless comment * fix: Add the ability to have es-syntax aliases * feat: Add compat aliases for es-syntax * feat: Use "featureName" over "ruleId" in error message
1 parent c8a87f3 commit 4778ae8

File tree

5 files changed

+1607
-961
lines changed

5 files changed

+1607
-961
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"[computed=false] Literal.key[bigint]": {
3+
"name": "no-bigint-property-names",
4+
"supported": ">=14.0.0"
5+
},
6+
"[shorthand=true][kind='get'], [shorthand=true][key.name='get']": {
7+
"name": "no-property-shorthands-get",
8+
"supported": ">=6.0.0"
9+
},
10+
"[shorthand=true][kind='set'], [shorthand=true][key.name='set']": {
11+
"name": "no-property-shorthands-set",
12+
"supported": ">=6.0.0"
13+
},
14+
"CallExpression[optional=true] > SpreadElement.arguments": {
15+
"name": "no-spread-parameters-after-optional-chaining",
16+
"supported": ">=16.1.0"
17+
},
18+
"MethodDefinition > PrivateName.key": {
19+
"name": "no-class-private-methods",
20+
"supported": ">=14.6.0"
21+
},
22+
"MemberExpression[object.name='Atomics'] > Identifier.property[name='notify']": {
23+
"name": "no-class-private-methods",
24+
"supported": ">=10.6.0"
25+
},
26+
"MemberExpression[object.name='Array'] > Identifier.property[name='fromAsync']": {
27+
"name": "no-class-array-fromasync",
28+
"supported": null
29+
}
30+
}

‎lib/rules/no-unsupported-features/es-syntax.js

+106-601
Large diffs are not rendered by default.

‎lib/rules/no-unsupported-features/es-syntax.json

+615
Large diffs are not rendered by default.

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"pretest": "npm run -s lint",
6464
"preversion": "npm test",
6565
"test": "nyc npm run -s test:_mocha",
66-
"test:_mocha": "_mocha \"tests/lib/**/*.js\" --reporter progress --timeout 4000",
66+
"test:_mocha": "_mocha --reporter progress --timeout 4000 \"tests/lib/**/*.js\"",
67+
"test:mocha": "_mocha --reporter progress --timeout 4000",
6768
"test:ci": "nyc npm run -s test:_mocha",
6869
"update:eslint-docs": "eslint-doc-generator",
6970
"version": "npm run -s build && eslint lib/rules --fix && git add .",

‎tests/lib/rules/no-unsupported-features/es-syntax.js

+854-359
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.