Skip to content

Commit

Permalink
feat!: use astro-eslint-parser v1 (#358)
Browse files Browse the repository at this point in the history
* feat!: use astro-eslint-parser v1

* Create large-kangaroos-build.md

* update

* fix lint error
  • Loading branch information
ota-meshi authored Apr 26, 2024
1 parent 4afd799 commit 3626074
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/large-kangaroos-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-astro": major
---

feat!: use astro-eslint-parser v1
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build:ts": "tsc --project ./tsconfig.build.json",
"clean": "rimraf lib .nyc_output dist coverage",
"test": "npm run mocha -- \"tests/src/**/*.ts\" --reporter dot --timeout 60000 && npm run test:type",
"test:type": "tsc",
"test:type": "tsc --noEmit",
"cover": "nyc --reporter=lcov npm run test",
"debug": "npm run mocha -- \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
"lint": "eslint .",
Expand Down Expand Up @@ -56,8 +56,8 @@
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@jridgewell/sourcemap-codec": "^1.4.14",
"@typescript-eslint/types": "^5.25.0",
"astro-eslint-parser": "^0.17.0",
"@typescript-eslint/types": "^7.7.1",
"astro-eslint-parser": "^1.0.1",
"eslint-compat-utils": "^0.5.0",
"globals": "^13.0.0",
"postcss": "^8.4.14",
Expand Down Expand Up @@ -86,8 +86,8 @@
"@types/react": "^18.0.15",
"@types/semver": "^7.3.9",
"@types/stylus": "^0.48.38",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"assert": "^2.0.0",
"astro": "^4.5.0",
"env-cmd": "^10.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/semi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export default createRule("semi", {
function checkForSemicolonForVariableDeclaration(
node: TSESTree.VariableDeclaration,
) {
const parent = node.parent!
const parent = node.parent

if (
(parent.type !== "ForStatement" || parent.init !== node) &&
Expand Down
2 changes: 1 addition & 1 deletion src/utils/ast-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ function getParentSyntaxParen(
| TSESTree.PrivateIdentifier,
sourceCode: SourceCode,
) {
const parent = node.parent!
const parent = node.parent

switch (parent.type) {
case "CallExpression":
Expand Down

0 comments on commit 3626074

Please sign in to comment.