-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
563 additions
and
438 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,2 @@ | ||
dist/ | ||
node_modules/ |
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
const config = require("./index.js") | ||
module.exports = 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,2 @@ | ||
import config from "prettier-config-atomic" | ||
export default 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
import { Linter } from "eslint" | ||
import type { Linter } from "eslint" | ||
import { pluginImportAstroRulesExtra } from "./plugin-import-rules.cjs" | ||
import astroPlugin from "eslint-plugin-astro" | ||
import * as onlyWarnPlugin from "eslint-plugin-only-warn" | ||
import astroParser from "astro-eslint-parser" | ||
|
||
export const astroConfig: Linter.ConfigOverride<Linter.RulesRecord> = { | ||
export const astroConfig: Linter.FlatConfig<Linter.RulesRecord> = { | ||
// astro files | ||
...astroPlugin.configs.recommended, | ||
files: ["*.astro"], | ||
parser: "astro-eslint-parser", | ||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
extraFileExtensions: [".astro"], | ||
languageOptions: { | ||
parser: astroParser, | ||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
extraFileExtensions: [".astro"], | ||
}, | ||
globals: { | ||
astroHTML: "readonly", | ||
}, | ||
}, | ||
plugins: ["astro", "only-warn"], | ||
extends: ["plugin:astro/recommended"], | ||
rules: { | ||
...pluginImportAstroRulesExtra | ||
plugins: { | ||
astro: astroPlugin, | ||
"only-warn": onlyWarnPlugin, | ||
}, | ||
globals: { | ||
astroHTML: "readonly", | ||
rules: { | ||
...pluginImportAstroRulesExtra, | ||
}, | ||
} |
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
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 |
---|---|---|
@@ -1,26 +1,24 @@ | ||
import { Linter } from "eslint" | ||
import type { Linter } from "eslint" | ||
import base from "./index.cjs" | ||
import { tsConfig } from "./typescript.cjs" | ||
|
||
const nonStrictConfig: Linter.Config = { | ||
const nonStrictConfig: Linter.FlatConfig[] = [ | ||
...base, | ||
overrides: [ | ||
// JavaScript: | ||
{ | ||
files: ["*.js", "*.jsx", "*.mjs", "*.cjs"], | ||
plugins: ["solid", ...(base.plugins ?? [])], | ||
extends: ["plugin:solid/recommended", ...(base.extends ?? [])], | ||
}, | ||
// TypeScript: | ||
{ | ||
...tsConfig, | ||
plugins: ["solid", ...(tsConfig.plugins ?? [])], | ||
extends: ["plugin:solid/typescript", ...(tsConfig.extends ?? [])], | ||
rules: tsConfig.rules, | ||
}, | ||
// The rest is the same | ||
...(base.overrides?.slice(1) ?? []), | ||
], | ||
} | ||
// JavaScript: | ||
{ | ||
files: ["*.js", "*.jsx", "*.mjs", "*.cjs"], | ||
plugins: ["solid", ...(base.plugins ?? [])], | ||
extends: ["plugin:solid/recommended", ...(base.extends ?? [])], | ||
}, | ||
// TypeScript: | ||
{ | ||
...tsConfig, | ||
plugins: ["solid", ...(tsConfig.plugins ?? [])], | ||
extends: ["plugin:solid/typescript", ...(tsConfig.extends ?? [])], | ||
rules: tsConfig.rules, | ||
}, | ||
// The rest is the same | ||
...(base.overrides?.slice(1) ?? []), | ||
] | ||
|
||
export default nonStrictConfig |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import nonStrictConfig from "./index-react.cjs" | ||
|
||
// remove only-warn from javascript | ||
if ( | ||
nonStrictConfig.plugins !== undefined && | ||
nonStrictConfig.plugins[nonStrictConfig.plugins.length - 1] === "only-warn" | ||
) { | ||
nonStrictConfig.plugins.pop() | ||
} | ||
// // remove only-warn from javascript | ||
// if ( | ||
// nonStrictConfig.plugins !== undefined && | ||
// nonStrictConfig.plugins[nonStrictConfig.plugins.length - 1] === "only-warn" | ||
// ) { | ||
// nonStrictConfig.plugins.pop() | ||
// } | ||
|
||
// remove only-warn from overrides | ||
nonStrictConfig.overrides?.forEach((overrides) => { | ||
if (overrides.plugins !== undefined && overrides.plugins[overrides.plugins.length - 1] === "only-warn") { | ||
overrides.plugins.pop() | ||
} | ||
}) | ||
// // remove only-warn from overrides | ||
// nonStrictConfig.overrides?.forEach((overrides) => { | ||
// if (overrides.plugins !== undefined && overrides.plugins[overrides.plugins.length - 1] === "only-warn") { | ||
// overrides.plugins.pop() | ||
// } | ||
// }) | ||
|
||
export default nonStrictConfig |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import nonStrictConfig from "./index-solid.cjs" | ||
|
||
// remove only-warn from javascript | ||
if ( | ||
nonStrictConfig.plugins !== undefined && | ||
nonStrictConfig.plugins[nonStrictConfig.plugins.length - 1] === "only-warn" | ||
) { | ||
nonStrictConfig.plugins.pop() | ||
} | ||
// // remove only-warn from javascript | ||
// if ( | ||
// nonStrictConfig.plugins !== undefined && | ||
// nonStrictConfig.plugins[nonStrictConfig.plugins.length - 1] === "only-warn" | ||
// ) { | ||
// nonStrictConfig.plugins.pop() | ||
// } | ||
|
||
// remove only-warn from overrides | ||
nonStrictConfig.overrides?.forEach((overrides) => { | ||
if (overrides.plugins !== undefined && overrides.plugins[overrides.plugins.length - 1] === "only-warn") { | ||
overrides.plugins.pop() | ||
} | ||
}) | ||
// // remove only-warn from overrides | ||
// nonStrictConfig.overrides?.forEach((overrides) => { | ||
// if (overrides.plugins !== undefined && overrides.plugins[overrides.plugins.length - 1] === "only-warn") { | ||
// overrides.plugins.pop() | ||
// } | ||
// }) | ||
|
||
export default nonStrictConfig |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import nonStrictConfig from "./index.cjs" | ||
|
||
// remove only-warn from javascript | ||
if ( | ||
nonStrictConfig.plugins !== undefined && | ||
nonStrictConfig.plugins[nonStrictConfig.plugins.length - 1] === "only-warn" | ||
) { | ||
nonStrictConfig.plugins.pop() | ||
} | ||
// // remove only-warn from javascript | ||
// if ( | ||
// nonStrictConfig.plugins !== undefined && | ||
// nonStrictConfig.plugins[nonStrictConfig.plugins.length - 1] === "only-warn" | ||
// ) { | ||
// nonStrictConfig.plugins.pop() | ||
// } | ||
|
||
// remove only-warn from overrides | ||
nonStrictConfig.overrides?.forEach((overrides) => { | ||
if (overrides.plugins !== undefined && overrides.plugins[overrides.plugins.length - 1] === "only-warn") { | ||
overrides.plugins.pop() | ||
} | ||
}) | ||
// // remove only-warn from overrides | ||
// nonStrictConfig.overrides?.forEach((overrides) => { | ||
// if (overrides.plugins !== undefined && overrides.plugins[overrides.plugins.length - 1] === "only-warn") { | ||
// overrides.plugins.pop() | ||
// } | ||
// }) | ||
|
||
export default nonStrictConfig |
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
Oops, something went wrong.