Skip to content

Commit

Permalink
Merge f7d8b95 into 7f1f55a
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Mar 16, 2023
2 parents 7f1f55a + f7d8b95 commit 78ec7f9
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 13 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ module.exports = {
usePrettierrc: true,
},
],
// Repo rule
"no-restricted-imports": [
"error",
{
patterns: [
{
group: ["/regexpp", "/regexpp/*"],
message: "Please use `@eslint-community/regexpp` instead.",
},
{
group: ["/eslint-utils", "/eslint-utils/*"],
message: "Please use `@eslint-community/eslint-utils` instead.",
},
],
},
],
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
},
"homepage": "https://ota-meshi.github.io/eslint-plugin-astro/",
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@jridgewell/sourcemap-codec": "^1.4.14",
"@typescript-eslint/types": "^5.25.0",
"astro-eslint-parser": "^0.12.0",
"eslint-utils": "^3.0.0",
"postcss": "^8.4.14",
"postcss-selector-parser": "^6.0.10"
},
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-deprecated-astro-canonicalurl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { READ, ReferenceTracker } from "eslint-utils"
import { READ, ReferenceTracker } from "@eslint-community/eslint-utils"
import { createRule } from "../utils"

export default createRule("no-deprecated-astro-canonicalurl", {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-deprecated-astro-fetchcontent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { READ, ReferenceTracker } from "eslint-utils"
import { READ, ReferenceTracker } from "@eslint-community/eslint-utils"
import { createRule } from "../utils"

export default createRule("no-deprecated-astro-fetchcontent", {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-deprecated-astro-resolve.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { READ, ReferenceTracker } from "eslint-utils"
import { READ, ReferenceTracker } from "@eslint-community/eslint-utils"
import { createRule } from "../utils"

export default createRule("no-deprecated-astro-resolve", {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-unused-css-selector.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { TSESTree } from "@typescript-eslint/types"
import { AST_NODE_TYPES } from "@typescript-eslint/types"
import type { AST } from "astro-eslint-parser"
import { getStaticValue } from "eslint-utils"
import { getStaticValue } from "@eslint-community/eslint-utils"
import type { Node as PostcssNode } from "postcss"
import postcss from "postcss"
import parser from "postcss-selector-parser"
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-unused-define-vars-in-style.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { TSESTree } from "@typescript-eslint/types"
import { AST_NODE_TYPES } from "@typescript-eslint/types"
import type { AST } from "astro-eslint-parser"
import { getPropertyName } from "eslint-utils"
import { getPropertyName } from "@eslint-community/eslint-utils"
import { createRule } from "../utils"
import { getAttributeName } from "../utils/ast-utils"
import { iterateCSSVars } from "../utils/style"
Expand Down
4 changes: 2 additions & 2 deletions src/rules/prefer-object-class-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { TSESTree } from "@typescript-eslint/types"
import { AST_NODE_TYPES } from "@typescript-eslint/types"
import type { AST } from "astro-eslint-parser"
import type { Rule } from "eslint"
import { getPropertyName } from "eslint-utils"
import { isCommaToken } from "eslint-utils"
import { getPropertyName } from "@eslint-community/eslint-utils"
import { isCommaToken } from "@eslint-community/eslint-utils"
import { createRule } from "../utils"
import {
extractConcatExpressions,
Expand Down
9 changes: 6 additions & 3 deletions src/rules/prefer-split-class-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import type { AST } from "astro-eslint-parser"
import { AST_NODE_TYPES } from "@typescript-eslint/types"
import type { TSESTree } from "@typescript-eslint/types"
import { createRule } from "../utils"
import type { TrackedReferences } from "eslint-utils"
import { isOpeningParenToken, ReferenceTracker } from "eslint-utils"
import type { TrackedReferences } from "@eslint-community/eslint-utils"
import {
isOpeningParenToken,
ReferenceTracker,
} from "@eslint-community/eslint-utils"
import {
extractConcatExpressions,
getAttributeName,
Expand All @@ -13,7 +16,7 @@ import {
import type { Token } from "../utils/string-literal-parser"
import { parseStringTokens } from "../utils/string-literal-parser"
import type { Rule } from "eslint"
import { getPropertyName } from "eslint-utils"
import { getPropertyName } from "@eslint-community/eslint-utils"

export default createRule("prefer-split-class-list", {
meta: {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/ast-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import type { AST } from "astro-eslint-parser"
import type { TSESTree } from "@typescript-eslint/types"
import { AST_NODE_TYPES } from "@typescript-eslint/types"
import type { RuleContext, SourceCode } from "../types"
import type { StaticValue } from "eslint-utils"
import type { StaticValue } from "@eslint-community/eslint-utils"
import {
isParenthesized,
isOpeningParenToken,
isClosingParenToken,
getStaticValue,
} from "eslint-utils"
} from "@eslint-community/eslint-utils"

/**
* Get the attribute key name from given attribute node
Expand Down
File renamed without changes.

0 comments on commit 78ec7f9

Please sign in to comment.