-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for flat config (#301)
* feat: add support for flat config * fix * Create rare-coats-report.md * fix test
- Loading branch information
Showing
14 changed files
with
218 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"eslint-plugin-json-schema-validator": minor | ||
--- | ||
|
||
feat: add support for flat config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import type { ESLint } from "eslint"; | ||
import * as jsoncParser from "jsonc-eslint-parser"; | ||
import * as yamlParser from "yaml-eslint-parser"; | ||
import * as tomlParser from "toml-eslint-parser"; | ||
export default [ | ||
{ | ||
plugins: { | ||
// eslint-disable-next-line @typescript-eslint/naming-convention -- plugin name | ||
get "json-schema-validator"(): ESLint.Plugin { | ||
// eslint-disable-next-line @typescript-eslint/no-require-imports -- ignore | ||
return require("../../index"); | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: [ | ||
"*.json", | ||
"**/*.json", | ||
"*.json5", | ||
"**/*.json5", | ||
"*.jsonc", | ||
"**/*.jsonc", | ||
], | ||
languageOptions: { | ||
parser: jsoncParser, | ||
}, | ||
rules: { | ||
// ESLint core rules known to cause problems with JSON. | ||
strict: "off", | ||
"no-unused-expressions": "off", | ||
"no-unused-vars": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["*.yaml", "**/*.yaml", "*.yml", "**/*.yml"], | ||
languageOptions: { | ||
parser: yamlParser, | ||
}, | ||
rules: { | ||
// ESLint core rules known to cause problems with YAML. | ||
"no-irregular-whitespace": "off", | ||
"no-unused-vars": "off", | ||
"spaced-comment": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["*.toml", "**/*.toml"], | ||
languageOptions: { | ||
parser: tomlParser, | ||
}, | ||
rules: { | ||
// ESLint core rules known to cause problems with TOML. | ||
"no-irregular-whitespace": "off", | ||
"spaced-comment": "off", | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import base from "./base"; | ||
export default [ | ||
...base, | ||
{ | ||
rules: { | ||
// eslint-plugin-json-schema-validator rules | ||
"json-schema-validator/no-invalid": "warn", | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
tests/fixtures/integrations/eslint-plugin/legacy-config-test01/src/test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var a = {foo: 'bar'} |
1 change: 1 addition & 0 deletions
1
tests/fixtures/integrations/eslint-plugin/legacy-config-test01/src/test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"foo": "bar"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters