diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml deleted file mode 100644 index c975a33..0000000 --- a/.github/linters/.yaml-lint.yml +++ /dev/null @@ -1,10 +0,0 @@ -rules: - document-end: disable - document-start: - level: warning - present: false - line-length: - level: warning - max: 80 - allow-non-breakable-words: true - allow-non-breakable-inline-mappings: true diff --git a/.github/linters/tsconfig.json b/.github/linters/tsconfig.json deleted file mode 100644 index a34cf90..0000000 --- a/.github/linters/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "extends": "../../tsconfig.json", - "compilerOptions": { - "noEmit": true - }, - "include": ["../../__tests__/**/*", "../../src/**/*"], - "exclude": ["../../dist", "../../node_modules", "../../coverage", "*.json"] -} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml deleted file mode 100644 index 5451fa6..0000000 --- a/.github/workflows/linter.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Lint Codebase - -on: - pull_request: - branches: - - main - push: - branches: - - main - -permissions: - contents: read - packages: read - statuses: write - -jobs: - lint: - name: Lint Codebase - runs-on: ubuntu-latest - - steps: - - name: Checkout - id: checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - fetch-depth: 0 - - - name: Setup Node.js - id: setup-node - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version-file: .node-version - cache: npm - - - name: Install Dependencies - id: install - run: npm ci - - - name: Lint Codebase - id: super-linter - uses: super-linter/super-linter/slim@v8.0.0 - env: - DEFAULT_BRANCH: main - FILTER_REGEX_EXCLUDE: dist/**/* - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TYPESCRIPT_DEFAULT_STYLE: prettier - VALIDATE_ALL_CODEBASE: true - VALIDATE_JAVASCRIPT_STANDARD: false - VALIDATE_TYPESCRIPT_ES: false - VALIDATE_TYPESCRIPT_STANDARD: false - VALIDATE_JSCPD: false - VALIDATE_YAML_PRETTIER: false - - - name: Run eslint - run: npm run lint:eslint diff --git a/.github/linters/.markdown-lint.yml b/.markdown-lint.yml similarity index 100% rename from .github/linters/.markdown-lint.yml rename to .markdown-lint.yml diff --git a/.github/linters/eslint.config.mjs b/eslint.config.mjs similarity index 97% rename from .github/linters/eslint.config.mjs rename to eslint.config.mjs index d09dad5..9020108 100644 --- a/.github/linters/eslint.config.mjs +++ b/eslint.config.mjs @@ -7,7 +7,7 @@ export default tseslint.config( // Ignore non-project files { name: 'ignore', - ignores: ['.github', 'dist', 'coverage', '**/*.json', 'jest.setup.js'] + ignores: ['.github', 'dist', 'coverage', '**/*.json', 'jest.setup.js', 'eslint.config.mjs'] }, // Use recommended rules from ESLint, TypeScript, and other plugins eslint.configs.recommended, @@ -21,7 +21,7 @@ export default tseslint.config( languageOptions: { ecmaVersion: 2023, parserOptions: { - project: ['./.github/linters/tsconfig.json'] + project: ['./tsconfig.lint.json'] } }, rules: { diff --git a/package.json b/package.json index 3ed1139..97ed777 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "ci-test": "jest", "format:write": "prettier --write **/*.ts", "format:check": "prettier --check **/*.ts", - "lint:eslint": "npx eslint . -c ./.github/linters/eslint.config.mjs", - "lint:markdown": "npx markdownlint --config .github/linters/.markdown-lint.yml \"*.md\"", + "lint:eslint": "npx eslint", + "lint:markdown": "npx markdownlint --config .markdown-lint.yml \"*.md\"", "lint": "npm run lint:eslint && npm run lint:markdown", "package": "ncc build src/index.ts --license licenses.txt", "package:watch": "npm run package -- --watch", diff --git a/tsconfig.lint.json b/tsconfig.lint.json new file mode 100644 index 0000000..a08b563 --- /dev/null +++ b/tsconfig.lint.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["./__tests__/**/*", "./src/**/*"], + "exclude": ["./dist", "./node_modules", "./coverage", "*.json"] +}