diff --git a/.github/workflows/GHPages.yml b/.github/workflows/GHPages.yml index 908c1682..f68d5012 100644 --- a/.github/workflows/GHPages.yml +++ b/.github/workflows/GHPages.yml @@ -13,7 +13,7 @@ permissions: # Allow one concurrent deployment concurrency: - group: pages + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/NodeCI.yml b/.github/workflows/NodeCI.yml index 68f83730..d1ea7c4a 100644 --- a/.github/workflows/NodeCI.yml +++ b/.github/workflows/NodeCI.yml @@ -6,6 +6,11 @@ on: pull_request: branches: [main] +# Allow one concurrent deployment +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-latest @@ -14,10 +19,19 @@ jobs: - uses: actions/setup-node@v4 with: node-version: lts/* + - uses: actions/cache/restore@v4 + with: + path: node_modules + key: ${{ runner.os }}-${{ hashFiles('package.json') }}-${{ github.ref }} - name: Install Packages run: yarn - name: Lint run: yarn lint + - uses: actions/cache/save@v4 + if: always() + with: + path: node_modules + key: ${{ runner.os }}-${{ hashFiles('package.json') }}-${{ github.ref }} test: strategy: matrix: diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index c942cdf2..165a0ba3 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -5,6 +5,11 @@ on: branches: - main +# Allow one concurrent deployment +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: release: name: Release @@ -16,10 +21,10 @@ jobs: # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits fetch-depth: 0 - - name: Setup Node.js 16 + - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version: "lts/*" - name: Install Dependencies run: yarn --ignore-engines @@ -38,4 +43,3 @@ jobs: title: "chore: release eslint-plugin-json-schema-validator" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 86a895f2..0c1dd999 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -3,6 +3,11 @@ name: 👔 Format on: workflow_dispatch: null +# Allow one concurrent deployment +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: format: runs-on: ubuntu-latest diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 5c402160..f14be805 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,6 +7,11 @@ permissions: issues: write pull-requests: write +# Allow one concurrent deployment +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: stale: if: github.repository == 'ota-meshi/eslint-plugin-json-schema-validator' diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 7e7bb7cc..0fe76971 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -33,16 +33,16 @@ export default async (): Promise> => { // Generate a schema store cache and include it in the bundle. schema.loadJson( - "https://json.schemastore.org/api/json/catalog.json", + "https://www.schemastore.org/api/json/catalog.json", // eslint-disable-next-line @typescript-eslint/no-explicit-any --- ignore {} as any, ); // eslint-disable-next-line @typescript-eslint/no-explicit-any --- ignore - schema.loadSchema("https://json.schemastore.org/eslintrc.json", {} as any); + schema.loadSchema("https://www.schemastore.org/eslintrc.json", {} as any); // eslint-disable-next-line @typescript-eslint/no-explicit-any --- ignore - schema.loadSchema("https://json.schemastore.org/prettierrc.json", {} as any); + schema.loadSchema("https://www.schemastore.org/prettierrc.json", {} as any); schema.loadSchema( - "https://json.schemastore.org/partial-eslint-plugins.json", + "https://www.schemastore.org/partial-eslint-plugins.json", // eslint-disable-next-line @typescript-eslint/no-explicit-any --- ignore {} as any, ); diff --git a/docs/.vitepress/shim/require-from-cache.mjs b/docs/.vitepress/shim/require-from-cache.mjs index 3a2120bf..7b10f246 100644 --- a/docs/.vitepress/shim/require-from-cache.mjs +++ b/docs/.vitepress/shim/require-from-cache.mjs @@ -1,28 +1,28 @@ -import catalog from "../../../.cached_schemastore/json.schemastore.org/api/json/catalog.json"; -import eslintrc from "../../../.cached_schemastore/json.schemastore.org/eslintrc.json"; -import partialEslintPlugins from "../../../.cached_schemastore/json.schemastore.org/partial-eslint-plugins.json"; -import prettierrc from "../../../.cached_schemastore/json.schemastore.org/prettierrc.json"; +import catalog from "../../../.cached_schemastore/www.schemastore.org/api/json/catalog.json"; +import eslintrc from "../../../.cached_schemastore/www.schemastore.org/eslintrc.json"; +import partialEslintPlugins from "../../../.cached_schemastore/www.schemastore.org/partial-eslint-plugins.json"; +import prettierrc from "../../../.cached_schemastore/www.schemastore.org/prettierrc.json"; /** * @param {string} p */ export default function fakeRequire(p) { if ( - p.endsWith(".cached_schemastore/json.schemastore.org/api/json/catalog.json") + p.endsWith(".cached_schemastore/www.schemastore.org/api/json/catalog.json") ) { return { ...catalog, timestamp: Infinity }; } - if (p.endsWith(".cached_schemastore/json.schemastore.org/eslintrc.json")) { + if (p.endsWith(".cached_schemastore/www.schemastore.org/eslintrc.json")) { return { ...eslintrc, timestamp: Infinity }; } if ( p.endsWith( - ".cached_schemastore/json.schemastore.org/partial-eslint-plugins.json", + ".cached_schemastore/www.schemastore.org/partial-eslint-plugins.json", ) ) { return { ...partialEslintPlugins, timestamp: Infinity }; } - if (p.endsWith(".cached_schemastore/json.schemastore.org/prettierrc.json")) { + if (p.endsWith(".cached_schemastore/www.schemastore.org/prettierrc.json")) { return { ...prettierrc, timestamp: Infinity }; } console.log(`unknown:${p}`); diff --git a/docs/.vitepress/theme/components/playground-block.vue b/docs/.vitepress/theme/components/playground-block.vue index 124f9db4..e889298e 100644 --- a/docs/.vitepress/theme/components/playground-block.vue +++ b/docs/.vitepress/theme/components/playground-block.vue @@ -68,7 +68,7 @@ const DEFAULT_CODE = `{ const JS_CODE = `/* eslint json-schema-validator/no-invalid: [ "error", - "https://json.schemastore.org/eslintrc" + "https://www.schemastore.org/eslintrc" ] -- About options: https://ota-meshi.github.io/eslint-plugin-json-schema-validator/rules/no-invalid.html#options */ @@ -85,7 +85,7 @@ module.exports = { `; const JSON_CODE = `/* eslint json-schema-validator/no-invalid: [ "error", - "https://json.schemastore.org/eslintrc" + "https://www.schemastore.org/eslintrc" ] -- About options: https://ota-meshi.github.io/eslint-plugin-json-schema-validator/rules/no-invalid.html#options */ @@ -100,7 +100,7 @@ const JSON_CODE = `/* eslint json-schema-validator/no-invalid: [ } } `; -const YAML_CODE = `# eslint json-schema-validator/no-invalid: [error, "https://json.schemastore.org/eslintrc"] +const YAML_CODE = `# eslint json-schema-validator/no-invalid: [error, "https://www.schemastore.org/eslintrc"] # -- About options: https://ota-meshi.github.io/eslint-plugin-json-schema-validator/rules/no-invalid.html#options extends: - 42 @@ -110,7 +110,7 @@ rules: "eqeqeq": "warn" "strict": "off" `; -const TOML_CODE = `# eslint json-schema-validator/no-invalid: [error, "https://json.schemastore.org/prettierrc"] +const TOML_CODE = `# eslint json-schema-validator/no-invalid: [error, "https://www.schemastore.org/prettierrc"] # -- About options: https://ota-meshi.github.io/eslint-plugin-json-schema-validator/rules/no-invalid.html#options trailingComma = "es3" tabWidth = 4 diff --git a/docs/rules/no-invalid.md b/docs/rules/no-invalid.md index 4451ee13..f3935ba3 100644 --- a/docs/rules/no-invalid.md +++ b/docs/rules/no-invalid.md @@ -24,18 +24,18 @@ This rule validates the file with JSON Schema and reports errors. // File name is ".eslintrc.json" /* eslint json-schema-validator/no-invalid: 'error' */ { - "overrides": [ - { - "files": ["good"], - /* ✓ GOOD */ - "extends": ["foo"] - }, - { - "files": ["bad"], - /* ✗ BAD */ - "extends": [42] - } - ] + overrides: [ + { + files: ["good"], + /* ✓ GOOD */ + extends: ["foo"], + }, + { + files: ["bad"], + /* ✗ BAD */ + extends: [42], + }, + ], } ``` @@ -45,19 +45,21 @@ This rule validates the file with JSON Schema and reports errors. ```json5 { - "json-schema-validator/no-invalid": [ - "error", + "json-schema-validator/no-invalid": [ + "error", + { + schemas: [ { - "schemas": [ - { - "fileMatch": [".eslintrc.json"], - "schema": {/* JSON Schema Definition */} // or string - } - ], - "useSchemastoreCatalog": true, - "mergeSchemas": true // or ["$schema", "options", "catalog"] - } - ] + fileMatch: [".eslintrc.json"], + schema: { + /* JSON Schema Definition */ + }, // or string + }, + ], + useSchemastoreCatalog: true, + mergeSchemas: true, // or ["$schema", "options", "catalog"] + }, + ], } ``` @@ -76,24 +78,24 @@ This option can also be given a JSON schema file or URL. This is useful for conf ```js /* eslint json-schema-validator/no-invalid: [ "error", - "https://json.schemastore.org/eslintrc" + "https://www.schemastore.org/eslintrc" ] */ module.exports = { - overrides: [ - { - files: ["good"], - /* ✓ GOOD */ - extends: ["foo"] - }, - { - files: ["bad"], - /* ✗ BAD */ - extends: [42] - } - ] -} + overrides: [ + { + files: ["good"], + /* ✓ GOOD */ + extends: ["foo"], + }, + { + files: ["bad"], + /* ✗ BAD */ + extends: [42], + }, + ], +}; ``` @@ -120,9 +122,9 @@ To match a custom block, use a glob like this: ```json5 { - // If you want to match the block. - "fileMatch": ["**/*blockType=i18n*"], - "schema": { "type": "object" /* JSON Schema Definition */ } + // If you want to match the block. + fileMatch: ["**/*blockType=i18n*"], + schema: { type: "object" /* JSON Schema Definition */ }, } ``` diff --git a/src/utils/ast/js/utils.ts b/src/utils/ast/js/utils.ts index 5a05d90a..c1cb8c9d 100644 --- a/src/utils/ast/js/utils.ts +++ b/src/utils/ast/js/utils.ts @@ -77,7 +77,10 @@ function findVariable( context: RuleContext, node: AST.ESLintIdentifier, ): Variable | null { - return eslintUtils.findVariable(getScope(context, node), node); + return eslintUtils.findVariable( + getScope(context, node), + node, + ) as Variable | null; } /** diff --git a/src/utils/schema.ts b/src/utils/schema.ts index c62cf0c8..04c67874 100644 --- a/src/utils/schema.ts +++ b/src/utils/schema.ts @@ -10,7 +10,7 @@ import type { SchemaObject } from "./types"; const debug = debugBuilder("eslint-plugin-json-schema-validator:utils-schema"); -const TTL = 1000 * 60 * 60 * 24; +const TTL = 1000 * 60 * 60 * 24; // 1 day const RELOADING = new Set(); /** diff --git a/tests/fixtures/rules/no-invalid/invalid/$schema-test/json-input.json b/tests/fixtures/rules/no-invalid/invalid/$schema-test/json-input.json index 174b7661..ff50a205 100644 --- a/tests/fixtures/rules/no-invalid/invalid/$schema-test/json-input.json +++ b/tests/fixtures/rules/no-invalid/invalid/$schema-test/json-input.json @@ -1,4 +1,4 @@ { - "$schema": "http://json.schemastore.org/tsconfig", + "$schema": "http://www.schemastore.org/tsconfig", "compilerOptions": 42 } diff --git a/tests/fixtures/rules/no-invalid/invalid/$schema-test/toml-input.toml b/tests/fixtures/rules/no-invalid/invalid/$schema-test/toml-input.toml index f36cef61..bd17b193 100644 --- a/tests/fixtures/rules/no-invalid/invalid/$schema-test/toml-input.toml +++ b/tests/fixtures/rules/no-invalid/invalid/$schema-test/toml-input.toml @@ -1,2 +1,2 @@ -"$schema" = "http://json.schemastore.org/tsconfig" +"$schema" = "http://www.schemastore.org/tsconfig" compilerOptions = 42 diff --git a/tests/fixtures/rules/no-invalid/invalid/$schema-test/yaml-input.yaml b/tests/fixtures/rules/no-invalid/invalid/$schema-test/yaml-input.yaml index 6ef34613..a4993d5b 100644 --- a/tests/fixtures/rules/no-invalid/invalid/$schema-test/yaml-input.yaml +++ b/tests/fixtures/rules/no-invalid/invalid/$schema-test/yaml-input.yaml @@ -1,2 +1,2 @@ -$schema: "http://json.schemastore.org/tsconfig" +$schema: "http://www.schemastore.org/tsconfig" compilerOptions: 42 diff --git a/tests/fixtures/rules/no-invalid/invalid/direct/_config.json b/tests/fixtures/rules/no-invalid/invalid/direct/_config.json index 9a78ed8d..81ed3391 100644 --- a/tests/fixtures/rules/no-invalid/invalid/direct/_config.json +++ b/tests/fixtures/rules/no-invalid/invalid/direct/_config.json @@ -1,3 +1,3 @@ { - "options": ["https://json.schemastore.org/eslintrc"] + "options": ["https://www.schemastore.org/eslintrc"] } diff --git a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/_config.json b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/_config.json index 8bee7887..dadca95e 100644 --- a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/_config.json +++ b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/_config.json @@ -11,7 +11,7 @@ "eslintrc-escape-input.json", "eslintrc-js-input.js" ], - "schema": "https://json.schemastore.org/eslintrc" + "schema": "https://www.schemastore.org/eslintrc" } ] } diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/_config.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/_config.json index 80308732..2887468d 100644 --- a/tests/fixtures/rules/no-invalid/invalid/http-test2/_config.json +++ b/tests/fixtures/rules/no-invalid/invalid/http-test2/_config.json @@ -4,7 +4,7 @@ "schemas": [ { "fileMatch": ["**/*.json"], - "schema": "https://yarnpkg.com/configuration/yarnrc.json" + "schema": "https://docs.renovatebot.com/renovate-schema.json" } ] } diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate-errors.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate-errors.json new file mode 100644 index 00000000..496a04dc --- /dev/null +++ b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate-errors.json @@ -0,0 +1,37 @@ +[ + { + "message": "\"packageRules[0].matchUpdateTypes\" must be string.", + "line": 6, + "column": 13, + "endLine": 6, + "endColumn": 31 + }, + { + "message": "\"packageRules[0].matchUpdateTypes\" must be equal to \"major\", \"minor\", \"patch\", \"pin\", \"pinDigest\", \"digest\", \"lockFileMaintenance\", \"rollback\", \"bump\" or \"replacement\".", + "line": 6, + "column": 13, + "endLine": 6, + "endColumn": 31 + }, + { + "message": "\"packageRules[0].matchUpdateTypes\" must match exactly one schema in oneOf.", + "line": 6, + "column": 13, + "endLine": 6, + "endColumn": 31 + }, + { + "message": "\"packageRules[0].matchUpdateTypes[4]\" must be string.", + "line": 6, + "column": 69, + "endLine": 6, + "endColumn": 71 + }, + { + "message": "\"packageRules[0].matchUpdateTypes[4]\" must be equal to \"major\", \"minor\", \"patch\", \"pin\", \"pinDigest\", \"digest\", \"lockFileMaintenance\", \"rollback\", \"bump\" or \"replacement\".", + "line": 6, + "column": 69, + "endLine": 6, + "endColumn": 71 + } +] diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate-input.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate-input.json new file mode 100644 index 00000000..966ee3bd --- /dev/null +++ b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate-input.json @@ -0,0 +1,8 @@ +{ + "extends": ["config:base", ":preserveSemverRanges"], + "packageRules": [ + { + "matchUpdateTypes": ["minor", "patch", "pin", "digest", 42] + } + ] +} diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate-requirements.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate-requirements.json new file mode 100644 index 00000000..92e59fe4 --- /dev/null +++ b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate-requirements.json @@ -0,0 +1,3 @@ +{ + "node": ">=10" +} diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate2-errors.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate2-errors.json new file mode 100644 index 00000000..496a04dc --- /dev/null +++ b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate2-errors.json @@ -0,0 +1,37 @@ +[ + { + "message": "\"packageRules[0].matchUpdateTypes\" must be string.", + "line": 6, + "column": 13, + "endLine": 6, + "endColumn": 31 + }, + { + "message": "\"packageRules[0].matchUpdateTypes\" must be equal to \"major\", \"minor\", \"patch\", \"pin\", \"pinDigest\", \"digest\", \"lockFileMaintenance\", \"rollback\", \"bump\" or \"replacement\".", + "line": 6, + "column": 13, + "endLine": 6, + "endColumn": 31 + }, + { + "message": "\"packageRules[0].matchUpdateTypes\" must match exactly one schema in oneOf.", + "line": 6, + "column": 13, + "endLine": 6, + "endColumn": 31 + }, + { + "message": "\"packageRules[0].matchUpdateTypes[4]\" must be string.", + "line": 6, + "column": 69, + "endLine": 6, + "endColumn": 71 + }, + { + "message": "\"packageRules[0].matchUpdateTypes[4]\" must be equal to \"major\", \"minor\", \"patch\", \"pin\", \"pinDigest\", \"digest\", \"lockFileMaintenance\", \"rollback\", \"bump\" or \"replacement\".", + "line": 6, + "column": 69, + "endLine": 6, + "endColumn": 71 + } +] diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate2-input.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate2-input.json new file mode 100644 index 00000000..966ee3bd --- /dev/null +++ b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate2-input.json @@ -0,0 +1,8 @@ +{ + "extends": ["config:base", ":preserveSemverRanges"], + "packageRules": [ + { + "matchUpdateTypes": ["minor", "patch", "pin", "digest", 42] + } + ] +} diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate2-requirements.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate2-requirements.json new file mode 100644 index 00000000..92e59fe4 --- /dev/null +++ b/tests/fixtures/rules/no-invalid/invalid/http-test2/renovate2-requirements.json @@ -0,0 +1,3 @@ +{ + "node": ">=10" +} diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-errors.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-errors.json deleted file mode 100644 index 80922853..00000000 --- a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-errors.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - "message": "\"npmAlwaysAuth\" must be boolean.", - "line": 3, - "column": 5, - "endLine": 3, - "endColumn": 20 - } -] diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-input.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-input.json deleted file mode 100644 index e20fb5d8..00000000 --- a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-input.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "npmAlwaysAuth": 42 -} diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-errors.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-errors.json deleted file mode 100644 index 80922853..00000000 --- a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-errors.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - "message": "\"npmAlwaysAuth\" must be boolean.", - "line": 3, - "column": 5, - "endLine": 3, - "endColumn": 20 - } -] diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-input.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-input.json deleted file mode 100644 index e20fb5d8..00000000 --- a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-input.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "npmAlwaysAuth": 42 -} diff --git a/tests/fixtures/rules/no-invalid/valid/$schema-test/json-input.json b/tests/fixtures/rules/no-invalid/valid/$schema-test/json-input.json index 87fa5e24..47306a4d 100644 --- a/tests/fixtures/rules/no-invalid/valid/$schema-test/json-input.json +++ b/tests/fixtures/rules/no-invalid/valid/$schema-test/json-input.json @@ -1,4 +1,4 @@ { - "$schema": "http://json.schemastore.org/tsconfig", + "$schema": "http://www.schemastore.org/tsconfig", "compilerOptions": {} } diff --git a/tests/fixtures/rules/no-invalid/valid/$schema-test/toml-input.toml b/tests/fixtures/rules/no-invalid/valid/$schema-test/toml-input.toml index d36f708c..be838e86 100644 --- a/tests/fixtures/rules/no-invalid/valid/$schema-test/toml-input.toml +++ b/tests/fixtures/rules/no-invalid/valid/$schema-test/toml-input.toml @@ -1,2 +1,2 @@ -"$schema" = "http://json.schemastore.org/tsconfig" +"$schema" = "http://www.schemastore.org/tsconfig" compilerOptions = {} diff --git a/tests/fixtures/rules/no-invalid/valid/$schema-test/yaml-input.yaml b/tests/fixtures/rules/no-invalid/valid/$schema-test/yaml-input.yaml index 9e64fbe7..37ac8bd0 100644 --- a/tests/fixtures/rules/no-invalid/valid/$schema-test/yaml-input.yaml +++ b/tests/fixtures/rules/no-invalid/valid/$schema-test/yaml-input.yaml @@ -1,2 +1,2 @@ -$schema: "http://json.schemastore.org/tsconfig" +$schema: "http://www.schemastore.org/tsconfig" compilerOptions: {} diff --git a/tests/fixtures/rules/no-invalid/valid/test01/_config.json b/tests/fixtures/rules/no-invalid/valid/test01/_config.json index 15959e61..e2f8a9cf 100644 --- a/tests/fixtures/rules/no-invalid/valid/test01/_config.json +++ b/tests/fixtures/rules/no-invalid/valid/test01/_config.json @@ -4,7 +4,7 @@ "schemas": [ { "fileMatch": ["eslintrc-input.json"], - "schema": "https://json.schemastore.org/eslintrc" + "schema": "https://www.schemastore.org/eslintrc" } ] } diff --git a/tests/fixtures/rules/no-invalid/valid/ts-config/_config.json b/tests/fixtures/rules/no-invalid/valid/ts-config/_config.json index 49146648..e56cffbc 100644 --- a/tests/fixtures/rules/no-invalid/valid/ts-config/_config.json +++ b/tests/fixtures/rules/no-invalid/valid/ts-config/_config.json @@ -4,7 +4,7 @@ "schemas": [ { "fileMatch": ["**/*.*"], - "schema": "https://json.schemastore.org/tsconfig" + "schema": "https://www.schemastore.org/tsconfig" } ] } diff --git a/tests/src/rules/no-invalid.ts b/tests/src/rules/no-invalid.ts index 8eccd76c..c4ed1895 100644 --- a/tests/src/rules/no-invalid.ts +++ b/tests/src/rules/no-invalid.ts @@ -32,7 +32,7 @@ tester.run( schemas: [ { fileMatch: ["tests/src/rules/.eslintrc.js"], - schema: "https://json.schemastore.org/eslintrc", + schema: "https://www.schemastore.org/eslintrc", }, ], useSchemastoreCatalog: false, @@ -58,7 +58,7 @@ tester.run( schemas: [ { fileMatch: [".eslintrc.*"], - schema: "https://json.schemastore.org/eslintrc", + schema: "https://www.schemastore.org/eslintrc", }, ], }, @@ -80,7 +80,7 @@ tester.run( schemas: [ { fileMatch: ["tests/src/rules/.eslintrc.js"], - schema: "https://json.schemastore.org/eslintrc", + schema: "https://www.schemastore.org/eslintrc", }, ], useSchemastoreCatalog: false, @@ -94,7 +94,7 @@ tester.run( }, { filename: path.join(__dirname, ".eslintrc.json"), - code: '{ "extends": [ 98 ], "$schema": "https://json.schemastore.org/eslintrc" }', + code: '{ "extends": [ 98 ], "$schema": "https://www.schemastore.org/eslintrc" }', options: [ { schemas: [ @@ -123,7 +123,7 @@ tester.run( }, { filename: path.join(__dirname, "version.json"), - code: '{ "extends": [ 99 ], "$schema": "https://json.schemastore.org/eslintrc" }', + code: '{ "extends": [ 99 ], "$schema": "https://www.schemastore.org/eslintrc" }', options: [ { schemas: [ @@ -155,7 +155,7 @@ tester.run( }, { filename: path.join(__dirname, "version.json"), - code: '{ "extends": [ 100 ], "$schema": "https://json.schemastore.org/eslintrc" }', + code: '{ "extends": [ 100 ], "$schema": "https://www.schemastore.org/eslintrc" }', options: [ { schemas: [ @@ -184,7 +184,7 @@ tester.run( }, { filename: path.join(__dirname, "version.json"), - code: '{ "extends": [ 101 ], "$schema": "https://json.schemastore.org/eslintrc" }', + code: '{ "extends": [ 101 ], "$schema": "https://www.schemastore.org/eslintrc" }', options: [ { schemas: [ @@ -213,7 +213,7 @@ tester.run( }, { filename: path.join(__dirname, "version.json"), - code: '{ "extends": [ 102 ], "$schema": "https://json.schemastore.org/eslintrc" }', + code: '{ "extends": [ 102 ], "$schema": "https://www.schemastore.org/eslintrc" }', options: [ { schemas: [ @@ -241,7 +241,7 @@ tester.run( }, { filename: path.join(__dirname, "version.json"), - code: '{ "extends": [ 103 ], "$schema": "https://json.schemastore.org/eslintrc" }', + code: '{ "extends": [ 103 ], "$schema": "https://www.schemastore.org/eslintrc" }', options: [ { schemas: [ @@ -265,7 +265,7 @@ tester.run( }, { filename: path.join(__dirname, "version.json"), - code: '{ "extends": [ 104 ], "$schema": "https://json.schemastore.org/eslintrc" }', + code: '{ "extends": [ 104 ], "$schema": "https://www.schemastore.org/eslintrc" }', options: [ { mergeSchemas: ["options", "catalog"], @@ -293,7 +293,7 @@ singleQuote = true`, schemas: [ { fileMatch: [".prettierrc.toml"], - schema: "https://json.schemastore.org/prettierrc", + schema: "https://www.schemastore.org/prettierrc", }, ], useSchemastoreCatalog: false,