Skip to content

Commit 297d27c

Browse files
committed
Move to modern Yarn with workspaces
1 parent bf6500e commit 297d27c

File tree

10 files changed

+5343
-2858
lines changed

10 files changed

+5343
-2858
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
- name: Install dependencies
26-
run: yarn --cwd eslint-plugin install --frozen-lockfile
26+
run: yarn install --immutable
2727
- name: Lint
28-
run: yarn --cwd eslint-plugin lint
28+
run: yarn lint
2929
- name: Test
30-
run: yarn --cwd eslint-plugin test:cov
30+
run: yarn test:cov
3131

3232
sonarcloud:
3333
name: SonarCloud
@@ -38,9 +38,9 @@ jobs:
3838
with:
3939
fetch-depth: 0
4040
- name: Install dependencies
41-
run: yarn --cwd eslint-plugin install --frozen-lockfile
41+
run: yarn install --immutable
4242
- name: Test
43-
run: yarn --cwd eslint-plugin test:cov
43+
run: yarn test:cov
4444
- name: SonarCloud Scan
4545
uses: SonarSource/sonarcloud-github-action@master
4646
env:

.gitignore

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
!.gitignore
2-
!.github/**/*.*
3-
node_modules
1+
# Editors & OS
2+
.DS_Store
43
.idea
54
*.iml
5+
6+
# Yarn
7+
.pnp.*
8+
.yarn/*
9+
!.yarn/patches
10+
!.yarn/plugins
11+
!.yarn/releases
12+
!.yarn/sdks
13+
!.yarn/versions
14+
node_modules
15+
16+
# Auto-generated files
617
*-report.json
718
.nyc_output
819
coverage

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.4.1.cjs

Lines changed: 873 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
nodeLinker: node-modules
2+
3+
plugins:
4+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
5+
spec: "@yarnpkg/plugin-workspace-tools"
6+
7+
yarnPath: .yarn/releases/yarn-3.4.1.cjs

eslint-plugin/CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ have the basic information before starting.
1111
- You must have Node.js 14.17.x, 16.x, 18.x or newer installed on your machine
1212
- You must know how an ESLint plugin works
1313
- You must know how to create a custom rule in an ESLint plugin
14-
- You can have Yarn 2.x installed beside npm ([installation guide](https://yarnpkg.com/getting-started/install))
14+
- You must have modern Yarn 2+ installed ([installation guide](https://yarnpkg.com/getting-started/install))
1515

1616
The ESLint documentation is very detailed and provides a useful starting point.\
1717
Check more here: https://eslint.org/docs/latest/extend/custom-rules
@@ -22,8 +22,7 @@ But it can be useful to prepare a test project to check the correct execution of
2222
## Installation
2323

2424
1. Clone the Git repository
25-
2. Run `yarn install` or `npm install` inside **eslint-plugin** directory\
26-
(depending on the Node.js package manager you use)
25+
2. Run `yarn install` inside **eslint-plugin** directory
2726
3. You are good to go! 🚀
2827

2928
## Create a rule

eslint-plugin/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
],
1212
"repository": {
1313
"type": "git",
14-
"url": "git+https://github.com/green-code-initiative/ecoCode-linter.git"
14+
"url": "git+https://github.com/green-code-initiative/ecoCode-linter.git",
15+
"directory": "eslint-plugin"
1516
},
1617
"license": "GPL-3.0",
1718
"author": "Green Code Initiative",

0 commit comments

Comments
 (0)