@theholocron/eslint-config 3.1.0 → 3.2.0
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 +8 -7
- package/cypress.eslint.config.js +7 -0
- package/eslint.config.js +16 -0
- package/index.js +6 -0
- package/package.json +11 -3
- package/storybook.eslint.config.js +7 -0
- package/CHANGELOG.md +0 -13
package/README.md
CHANGED
|
@@ -10,12 +10,13 @@ npm install --save-dev @theholocron/eslint-config
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
In your project `
|
|
13
|
+
In your project `eslint.config.js` add the following:
|
|
14
14
|
|
|
15
|
-
```
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
```javascript
|
|
16
|
+
import theHolocron, {
|
|
17
|
+
theHolocronCypress,
|
|
18
|
+
theHolocronStorybook,
|
|
19
|
+
} from "@theholocron/eslint-config";
|
|
20
|
+
|
|
21
|
+
export default [...theHolocron, ...theHolocronStorybook, ...theHolocronCypress];
|
|
21
22
|
```
|
package/eslint.config.js
CHANGED
|
@@ -1,15 +1,31 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { includeIgnoreFile } from "@eslint/compat";
|
|
1
4
|
import pluginJs from "@eslint/js";
|
|
2
5
|
import pluginReact from "eslint-plugin-react";
|
|
3
6
|
import globals from "globals";
|
|
4
7
|
import tseslint from "typescript-eslint";
|
|
5
8
|
|
|
9
|
+
// Get the current file path and directory (node_modules/foo/)
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = path.dirname(__filename);
|
|
12
|
+
|
|
13
|
+
// Navigate to the root directory (two levels up from node_modules/foo/)
|
|
14
|
+
const rootDir = path.resolve(__dirname, "../../../");
|
|
15
|
+
|
|
16
|
+
// Resolve the .gitignore file from the root directory
|
|
17
|
+
const gitignorePath = path.resolve(rootDir, ".gitignore");
|
|
18
|
+
|
|
6
19
|
/**
|
|
7
20
|
* @see https://eslint.org/docs/latest/use/configure/
|
|
8
21
|
* @type {import("eslint").Linter.Config}
|
|
9
22
|
*/
|
|
10
23
|
export default [
|
|
24
|
+
includeIgnoreFile(gitignorePath),
|
|
11
25
|
{
|
|
26
|
+
name: "The Holocron",
|
|
12
27
|
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
|
|
28
|
+
ignores: ["**/mockServiceWorker.js"],
|
|
13
29
|
},
|
|
14
30
|
{
|
|
15
31
|
languageOptions: {
|
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "A ESLint configuration for writing well-formed Javascript within the Galaxy.",
|
|
5
|
-
"homepage": "https://github.com/theholocron/configs/tree/main/packages/
|
|
5
|
+
"homepage": "https://github.com/theholocron/configs/tree/main/packages/eslint-config#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/configs/issues",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -11,11 +11,19 @@
|
|
|
11
11
|
"license": "GPL-3.0",
|
|
12
12
|
"author": "Newton Koumantzelis",
|
|
13
13
|
"type": "module",
|
|
14
|
-
"main": "
|
|
14
|
+
"main": "index.js",
|
|
15
|
+
"files": [
|
|
16
|
+
"cypress.eslint.config.js",
|
|
17
|
+
"eslint.config.js",
|
|
18
|
+
"storybook.eslint.config.js"
|
|
19
|
+
],
|
|
15
20
|
"dependencies": {
|
|
21
|
+
"@eslint/compat": "^1.2.1",
|
|
16
22
|
"@eslint/js": "^9.12.0",
|
|
17
23
|
"eslint": "^9.12.0",
|
|
24
|
+
"eslint-plugin-cypress": "^4.0.0",
|
|
18
25
|
"eslint-plugin-react": "^7.37.1",
|
|
26
|
+
"eslint-plugin-storybook": "^0.10.1",
|
|
19
27
|
"globals": "^15.11.0",
|
|
20
28
|
"typescript-eslint": "^8.9.0"
|
|
21
29
|
},
|
package/CHANGELOG.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# @theholocron/eslint-config
|
|
2
|
-
|
|
3
|
-
## 3.1.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- [`4f8154a`](https://github.com/theholocron/configs/commit/4f8154a534d5d7668cd2659da322448f39646aed) Thanks [@iamnewton](https://github.com/iamnewton)! - Update to include Alex language linting in lint-staging
|
|
8
|
-
|
|
9
|
-
## 3.0.0
|
|
10
|
-
|
|
11
|
-
### Major Changes
|
|
12
|
-
|
|
13
|
-
- [`88d7f99`](https://github.com/theholocron/configs/commit/88d7f995dd02cdbe63817ac0d13905d5aea3777a) Thanks [@iamnewton](https://github.com/iamnewton)! - Initial release
|