Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@ jobs:

strategy:
matrix:
node-version: [18.14]
node-version: [22.14]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Format check
run: yarn format:check
run: pnpm run format:check
- name: Unit Testing
run: yarn test
run: pnpm run test
env:
CI: true
- name: Production build
run: yarn build
run: pnpm run build
11 changes: 7 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.14"
node-version: "22.14"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install dependencies
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Prepare package for publishing
run: yarn prepublish
run: pnpm run prepublish
- name: Publish package
run: yarn publish --access public
run: pnpm run publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 1 addition & 6 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
{
"verbose": true,
"globals": {
"ts-jest": {
"diagnostics": false
}
},
"transform": {
"^.+\\.ts$": "ts-jest"
"^.+\\.ts$": ["ts-jest", { "diagnostics": false }]
},
"testRegex": "(src/.*\\.test)\\.ts$",
"testPathIgnorePatterns": ["/node_modules/", "\\.d\\.ts$", "lib/.*"],
Expand Down
17 changes: 17 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
add *PKGS:
pnpm add -w {{PKGS}}

add-dev *PKGS:
pnpm add -w -D {{PKGS}}

rm *PKGS:
pnpm rm {{PKGS}}

build:
pnpm run build

test:
pnpm run test

format:
pnpm run format
75 changes: 40 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
"type": "git",
"url": "https://github.com/profico/eslint-plugin-profico.git"
},
"version": "1.3.0",
"version": "2.0.0",
"description": "ESLint plugin and configurations by Profico",
"main": "lib/index.js",
"scripts": {
"prepare": "husky install",
"clean": "rimraf lib",
"prebuild": "rimraf lib && rimraf node_modules/@types/eslint/node_modules/@types/estree",
"build": "tsc",
"build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json",
"prettier": "prettier \"*.{js,json,yml,yaml,md}\" \"src/**/*\"",
"format": "yarn prettier --write && pretty-quick --staged",
"format:check": "pretty-quick --staged && yarn prettier --check",
"format": "pnpm run prettier --write && pretty-quick --staged",
"format:check": "pretty-quick --staged && pnpm run prettier --check",
"test:base": "jest --config jest.config.json",
"test:watch": "yarn test:base --watch",
"test": "yarn test:base",
"prepublish": "yarn run clean && yarn run build"
"test:watch": "pnpm run test:base --watch",
"test": "pnpm run test:base",
"prepublish": "pnpm run clean && pnpm run build"
},
"publishConfig": {
"name": "@profi.co/eslint-plugin"
Expand All @@ -40,34 +40,39 @@
"email": "fpolic@profico.hr"
},
"license": "MIT",
"peerDependencies": {
"eslint": ">=7"
},
"devDependencies": {
"@next/eslint-plugin-next": "^13.1.6",
"@types/eslint": "^8.44.1",
"@types/estree": "^1.0.1",
"@types/node": "^17.0.5",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.8.1",
"eslint": "8.9.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-next": "^13.1.6",
"eslint-config-prettier": "^8.6.0",
"dependencies": {
"@eslint/eslintrc": "^3.0.2",
"@eslint/js": "^9.0.0",
"@next/eslint-plugin-next": "^15.1.7",
"@types/eslint": "^9.6.1",
"@types/estree": "^1.0.6",
"@types/node": "^22.13.1",
"@typescript-eslint/eslint-plugin": "^8.24.0",
"@typescript-eslint/parser": "^8.24.0",
"@typescript-eslint/utils": "^8.24.0",
"eslint": "^9.20.1",
"eslint-config-next": "^15.1.7",
"eslint-config-prettier": "^10.0.1",
"eslint-config-react": "^1.1.7",
"eslint-import-resolver-typescript": "^3.5.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^7.0.4",
"jest": "^27.4.5",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",
"rimraf": "^3.0.2",
"ts-jest": "^27.1.2",
"typescript": "^4.5.4"
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"husky": "^9.1.7",
"jest": "^29.7.0",
"prettier": "^3.5.0",
"pretty-quick": "^4.0.0",
"rimraf": "^6.0.1",
"ts-jest": "^29.2.5",
"typescript": "^5.7.3"
},
"type": "module",
"exports": {
".": {
"import": "./lib/index.js",
"require": "./lib/index.cjs"
}
}
}
Loading