@contentstack/common-config 1.0.2
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 +38 -0
- package/eslint.config.mjs +24 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @contentstack/common-config
|
|
2
|
+
|
|
3
|
+
Common configuration files for Contentstack Studio SDK packages. This package provides shared ESLint configurations and other common tooling configurations used across the Studio SDK monorepo.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The `common-config` package centralizes configuration files to ensure consistency across all packages in the Studio SDK. It provides:
|
|
8
|
+
|
|
9
|
+
- **ESLint configurations** for TypeScript and React projects
|
|
10
|
+
- **Shared linting rules** and best practices
|
|
11
|
+
- **Consistent code style** across all packages
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
This package is a private package within the monorepo and is automatically available to all packages. It's installed as a dev dependency in packages that need ESLint configuration.
|
|
16
|
+
|
|
17
|
+
## Customization
|
|
18
|
+
|
|
19
|
+
To extend these configurations in your package:
|
|
20
|
+
|
|
21
|
+
1. Import the base configuration
|
|
22
|
+
2. Add your package-specific rules
|
|
23
|
+
3. Export the extended configuration
|
|
24
|
+
|
|
25
|
+
**Example:**
|
|
26
|
+
```javascript
|
|
27
|
+
import commonEslintConfig from "@contentstack/common-config/eslint.config.mjs";
|
|
28
|
+
|
|
29
|
+
export default [
|
|
30
|
+
...commonEslintConfig,
|
|
31
|
+
{
|
|
32
|
+
rules: {
|
|
33
|
+
// Your custom rules
|
|
34
|
+
"no-console": "warn",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import globals from "globals";
|
|
2
|
+
import pluginJs from "@eslint/js";
|
|
3
|
+
import tseslint from "typescript-eslint";
|
|
4
|
+
import "eslint-plugin-only-warn";
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
|
|
8
|
+
pluginJs.configs.recommended,
|
|
9
|
+
...tseslint.configs.recommended,
|
|
10
|
+
{
|
|
11
|
+
rules: {
|
|
12
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
13
|
+
// allow unused vars with underscore prefix
|
|
14
|
+
"@typescript-eslint/no-unused-vars": [
|
|
15
|
+
"warn",
|
|
16
|
+
{
|
|
17
|
+
argsIgnorePattern: "^_",
|
|
18
|
+
varsIgnorePattern: "^_",
|
|
19
|
+
destructuredArrayIgnorePattern: "^_",
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
];
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@contentstack/common-config",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Common configuration for Contentstack Studio SDKs",
|
|
5
|
+
"author": "Contentstack",
|
|
6
|
+
"homepage": "https://github.com/contentstack/composable-studio-sdk/tree/main/packages/common-config#readme",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"@eslint/compat": "^1.1.1",
|
|
10
|
+
"@eslint/js": "^9.9.1",
|
|
11
|
+
"eslint": "^9.9.1",
|
|
12
|
+
"eslint-plugin-only-warn": "^1.1.0",
|
|
13
|
+
"eslint-plugin-react": "^7.35.0",
|
|
14
|
+
"globals": "^15.9.0",
|
|
15
|
+
"prettier": "^3.3.3",
|
|
16
|
+
"typescript-eslint": "^8.3.0"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"eslint.config.mjs",
|
|
20
|
+
"package.json",
|
|
21
|
+
"package-lock.json"
|
|
22
|
+
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/contentstack/composable-studio-sdk.git"
|
|
26
|
+
},
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/contentstack/composable-studio-sdk/issues"
|
|
29
|
+
},
|
|
30
|
+
"gitHead": "e4da9bd41494609c95cb9b48de47aa5a6e5c2ac3"
|
|
31
|
+
}
|