mirror of
https://github.com/devkitshq/notifkit.git
synced 2026-10-19 18:24:52 +02:00
- Add .github/workflows/ci.yml with typecheck, lint, build, test, and badge publishing - Add scripts/coverage-badge.mjs to generate shields.io endpoint JSON from coverage summary - Update vitest.config.ts with json-summary reporter and include package sources - Update README.md coverage badge to read from badges branch endpoint - Ignore badge directory and ignore .next in eslint.config.js
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
import tseslint from "@typescript-eslint/eslint-plugin";
|
|
import tsParser from "@typescript-eslint/parser";
|
|
|
|
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
export default [
|
|
{
|
|
ignores: [
|
|
"**/dist/**",
|
|
"**/node_modules/**",
|
|
"**/.next/**",
|
|
"**/*.js",
|
|
"**/*.cjs",
|
|
"**/*.mjs",
|
|
"**/tsup.config.ts",
|
|
"**/vitest.config.ts"
|
|
]
|
|
},
|
|
{
|
|
files: ["**/*.ts", "**/*.tsx"],
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
project: true,
|
|
tsconfigRootDir: import.meta.dirname
|
|
}
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": tseslint
|
|
},
|
|
rules: {
|
|
...tseslint.configs.recommended.rules,
|
|
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
"@typescript-eslint/consistent-type-imports": [
|
|
"error",
|
|
{ "prefer": "type-imports" }
|
|
],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/no-floating-promises": "error",
|
|
"@typescript-eslint/no-misused-promises": "error",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "caughtErrorsIgnorePattern": "^_" }
|
|
]
|
|
}
|
|
}
|
|
];
|