@enke.dev/lint 0.10.4 → 0.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,7 +26,7 @@ export default config;
26
26
 
27
27
  ### Using Typescript
28
28
 
29
- If you intend to use Typescript for your config file, you just have to install `typescript` and `jiti`.
29
+ If you intend to use Typescript for your config file, you just have to install `typescript`, `typescript-eslint` and `jiti`.
30
30
 
31
31
  Your config file can then be renamed to `eslint.config.ts` and look like this at minimum:
32
32
 
package/eslint.config.js CHANGED
@@ -1,5 +1,7 @@
1
1
  /// <reference types="./eslint-plugins.d.ts" />
2
2
  import { readFile } from 'node:fs/promises';
3
+ import { cwd } from 'node:process';
4
+ import { pathToFileURL } from 'node:url';
3
5
  import { fixupPluginRules } from '@eslint/compat';
4
6
  import eslintPluginJs from '@eslint/js';
5
7
  import eslintPluginJson from '@eslint/json';
@@ -17,11 +19,17 @@ import eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
17
19
  import { configs as eslintPluginWebComponentsConfigs } from 'eslint-plugin-wc';
18
20
  import eslintTs from 'typescript-eslint';
19
21
  // collect gitignore excludes
20
- const gitIgnores = await readFile(new URL('./.gitignore', import.meta.url), 'utf-8');
21
- const gitIgnoreLines = gitIgnores
22
- .split('\n')
23
- .map(line => line.trim().replace(/^\//, ''))
24
- .filter(line => line && !line.startsWith('#'));
22
+ let gitIgnoreLines = [];
23
+ try {
24
+ const gitIgnores = await readFile(pathToFileURL(`${cwd()}/.gitignore`).href, 'utf-8');
25
+ gitIgnoreLines = gitIgnores
26
+ .split('\n')
27
+ .map(line => line.trim().replace(/^\//, ''))
28
+ .filter(line => line && !line.startsWith('#'));
29
+ }
30
+ catch (error) {
31
+ // noop - maybe a warning?
32
+ }
25
33
  // shared parser options
26
34
  const parserOptions = {
27
35
  ecmaVersion: 'latest',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enke.dev/lint",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "description": "Meta package to provide linting for web projects",
5
5
  "homepage": "https://github.com/enke-dev/lint",
6
6
  "repository": {
@@ -19,8 +19,8 @@
19
19
  "main": "eslint.config.js",
20
20
  "types": "eslint.config.d.ts",
21
21
  "scripts": {
22
- "lint": "eslint -c test.config.ts .",
23
22
  "test": "node --experimental-strip-types --test test.run.ts",
23
+ "lint": "eslint -c test.eslint.config.ts .",
24
24
  "inspect": "./node_modules/.bin/eslint-config-inspector --config eslint.config.ts",
25
25
  "dev": "tsc -p tsconfig.build.json --watch",
26
26
  "build": "tsc -p tsconfig.build.json"
@@ -71,6 +71,10 @@
71
71
  "eslint": "9.35.0",
72
72
  "jiti": "2.5.1",
73
73
  "prettier": "3.6.2",
74
+ "stylelint": "16.24.0",
75
+ "stylelint-config-rational-order": "0.1.2",
76
+ "stylelint-config-standard-scss": "16.0.0",
77
+ "stylelint-order": "7.0.0",
74
78
  "typescript": "5.9.2",
75
79
  "typescript-eslint": "8.44.0"
76
80
  }