Skip to content

Commit

Permalink
chore(experimental): make eslint respect .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
06kellyjac committed Dec 6, 2024
1 parent 309b522 commit cead805
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
9 changes: 9 additions & 0 deletions experimental/license-inventory/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import { includeIgnoreFile } from '@eslint/compat';

import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const gitignorePath = path.resolve(__dirname, '.gitignore');

/** @type {import('eslint').Linter.Config[]} */
export default [
includeIgnoreFile(gitignorePath),
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
Expand Down
19 changes: 19 additions & 0 deletions experimental/license-inventory/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions experimental/license-inventory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@eslint/compat": "^1.2.3",
"@eslint/js": "^9.15.0",
"@jest/globals": "^29.7.0",
"@swc/cli": "^0.5.1",
Expand Down

0 comments on commit cead805

Please sign in to comment.