Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"eslint:recommended",
"plugin:eslint-plugin/recommended",
"plugin:n/recommended",
"plugin:prettier/recommended"
"plugin:prettier/recommended",
"plugin:jsdoc/recommended"
],
"rules": {
"no-var": "error",
Expand All @@ -22,6 +23,15 @@
],
"eslint-plugin/prefer-placeholders": "error",
"eslint-plugin/test-case-shorthand-strings": "error",
"prettier/prettier": "error"
"prettier/prettier": "error",
"jsdoc/check-types": "off",
"jsdoc/no-undefined-types": "off",
"jsdoc/require-jsdoc": "off",
"jsdoc/require-param-description": "off",
"jsdoc/require-property-description": "off",
"jsdoc/require-returns-description": "off",
"jsdoc/require-yields": "off",
"jsdoc/tag-lines": ["warn", "never", { "startLines": 1 }],
"jsdoc/valid-types": "off"
}
}
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@ jobs:
- name: ▶️ Run lint script
run: npm run lint

types:
name: 🌋 Types
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⎔ Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: 📥 Install dependencies
run: npm ci

- name: ▶️ Typecheck
uses: gozala/[email protected]
with:
error_fail_threshold: 160

test:
name:
🧪 Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ node_modules
.idea
coverage/
.eslintcache

# Generated types
/rules/**/*.d.ts
/rules/**/*.d.ts.map
/index.d.ts
/index.d.ts.map
2 changes: 1 addition & 1 deletion __tests__/rule-tester.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @fileoverview Helpers for tests.
* @file Helpers for tests.
* @author 唯然<[email protected]>
*/
'use strict'
Expand Down
11 changes: 11 additions & 0 deletions declaration.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig",
"exclude": ["__tests__/**/*"],
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"noEmit": false,
"emitDeclarationOnly": true
}
}
Loading