Skip to content

Commit 07254ec

Browse files
committed
Split into multiple entry points to fix import errors from unused configs
1 parent 65afeaa commit 07254ec

20 files changed

+41
-73
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ To use the default config, follow these steps:
5858
3. Include default config in your [ESLint configuration file](https://eslint.org/docs/latest/use/configure/configuration-files) (usually `eslint.config.js`):
5959

6060
```js
61-
import cpeslint from '@code-pushup/eslint-config';
61+
import javascript from '@code-pushup/eslint-config/javascript.js';
6262
import tseslint from 'typescript-eslint';
6363

64-
export default tseslint.config(...cpeslint.javascript);
64+
export default tseslint.config(...javascript);
6565
```
6666

6767
Depending on your tech stack, you may wish to extend other configs as well ([listed above](#⚙️-configs)). This will require installing additional peer dependencies. For more details, refer to setup docs for the configs you're interested in using.

docs/angular.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Config for **Angular** projects.
1515
4. Add to your `eslint.config.js` file:
1616

1717
```js
18-
import cpeslint from '@code-pushup/eslint-config';
18+
import angular from '@code-pushup/eslint-config/angular.js';
1919
import tseslint from 'typescript-eslint';
2020

2121
export default tseslint.config(
22-
...cpeslint.angular,
22+
...angular,
2323
{
2424
// It is recommended that selectors in Angular use a common custom prefix
2525
// - see https://angular.io/guide/styleguide#style-02-07

docs/cypress.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Config for projects using **Cypress** for testing.
1414
3. Add to your `eslint.config.js` file:
1515

1616
```js
17-
import cpeslint from '@code-pushup/eslint-config';
17+
import cypress from '@code-pushup/eslint-config/cypress.js';
1818
import tseslint from 'typescript-eslint';
1919

20-
export default tseslint.config(...cpeslint.cypress);
20+
export default tseslint.config(...cypress);
2121
```
2222

2323
## 📏 Rules (6)

docs/graphql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Config for **GraphQL servers** implemented in Node.js.
1717

1818
```js
1919
export default tseslint.config(
20-
...cpeslint.graphql,
20+
// ...
2121
{
2222
files: ['**/*.graphql'],
2323
languageOptions: {
@@ -33,10 +33,10 @@ Config for **GraphQL servers** implemented in Node.js.
3333
4. Add to your `eslint.config.js` file:
3434

3535
```js
36-
import cpeslint from '@code-pushup/eslint-config';
36+
import graphql from '@code-pushup/eslint-config/graphql.js';
3737
import tseslint from 'typescript-eslint';
3838
39-
export default tseslint.config(...cpeslint.graphql);
39+
export default tseslint.config(...graphql);
4040
```
4141

4242
## 📏 Rules (317)

docs/javascript.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@ Default config, suitable for any **JavaScript/TypeScript** project.
44

55
## 🏗️ Setup
66

7-
1. If you haven't already, make sure to [install `@code-pushup/eslint-config` and its required peer dependencies](../README.md#🏗️-setup).
8-
2. Add to your `eslint.config.js` file:
9-
10-
```js
11-
import cpeslint from '@code-pushup/eslint-config';
12-
import tseslint from 'typescript-eslint';
13-
14-
export default tseslint.config(...cpeslint.javascript);
15-
```
7+
Refer to [setup instructions in README](../README.md#🏗️-setup).
168

179
## 📏 Rules (290)
1810

docs/jest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Config for projects using **Jest** for testing.
1414
3. Add to your `eslint.config.js` file:
1515

1616
```js
17-
import cpeslint from '@code-pushup/eslint-config';
17+
import jest from '@code-pushup/eslint-config/jest.js';
1818
import tseslint from 'typescript-eslint';
1919

2020
export default tseslint.config(
21-
...cpeslint.jest,
21+
...jest,
2222
{
2323
// customize rules if needed:
2424
rules: {

docs/ngrx.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Config for **Angular** projects using **NgRx** library.
1515
4. Add to your `eslint.config.js` file:
1616

1717
```js
18-
import cpeslint from '@code-pushup/eslint-config';
18+
import ngrx from '@code-pushup/eslint-config/ngrx.js';
1919
import tseslint from 'typescript-eslint';
2020

2121
export default tseslint.config(
22-
...cpeslint.ngrx,
22+
...ngrx,
2323
{
2424
// It is recommended that selectors in Angular use a common custom prefix
2525
// - see https://angular.io/guide/styleguide#style-02-07

docs/node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Config for **Node.js** projects.
1414
3. Add to your `eslint.config.js` file:
1515

1616
```js
17-
import cpeslint from '@code-pushup/eslint-config';
17+
import node from '@code-pushup/eslint-config/node.js';
1818
import tseslint from 'typescript-eslint';
1919

20-
export default tseslint.config(...cpeslint.node);
20+
export default tseslint.config(...node);
2121
```
2222

2323
## 📏 Rules (294)

docs/storybook.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Config for projects using **Storybook** for UI components.
1414
3. Add to your `eslint.config.js` file:
1515

1616
```js
17-
import cpeslint from '@code-pushup/eslint-config';
17+
import storybook from '@code-pushup/eslint-config/storybook.js';
1818
import tseslint from 'typescript-eslint';
1919

20-
export default tseslint.config(...cpeslint.storybook);
20+
export default tseslint.config(...storybook);
2121
```
2222

2323
## 📏 Rules (11)

docs/typescript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ Config for strict **TypeScript** projects.
5959
3. Add to your `eslint.config.js` file:
6060

6161
```js
62-
import cpeslint from '@code-pushup/eslint-config';
62+
import typescript from '@code-pushup/eslint-config/typescript.js';
6363
import tseslint from 'typescript-eslint';
6464
65-
export default tseslint.config(...cpeslint.typescript);
65+
export default tseslint.config(...typescript);
6666
```
6767

6868
## 📏 Rules (345)

0 commit comments

Comments
 (0)