Skip to content

Commit 766724b

Browse files
author
Joel Denning
committed
Add linter
1 parent cb4fcdd commit 766724b

File tree

6 files changed

+583
-1
lines changed

6 files changed

+583
-1
lines changed

.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "important-stuff",
3+
"parser": "@babel/eslint-parser"
4+
}

.github/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build and Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: "17"
16+
- uses: pnpm/action-setup@v1.2.1
17+
with:
18+
version: 6.9.1
19+
- run: pnpm install --frozen-lockfile
20+
- run: pnpm test
21+
- run: pnpm run check-format
22+
- run: pnpm run lint

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.prettierignore
22
.gitignore
33
LICENSE
4-
yarn.lock
4+
yarn.lock
5+
pnpm-lock.yaml

babel.config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": [],
3+
"plugins": []
4+
}

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"type": "module",
77
"scripts": {
88
"format": "prettier --write .",
9+
"lint": "prettier --check . && eslint lib",
910
"test": "node --experimental-loader ./lib/node-loader-babel.js ./test/run-tests.js",
1011
"prepare": "husky install"
1112
},
@@ -21,7 +22,11 @@
2122
"homepage": "https://github.com/node-loaders/node-loader-babel#readme",
2223
"devDependencies": {
2324
"@babel/core": "^7.11.6",
25+
"@babel/eslint-parser": "^7.14.7",
2426
"@babel/plugin-transform-react-jsx": "^7.10.4",
27+
"eslint": "^7.30.0",
28+
"eslint-config-important-stuff": "^1.1.0",
29+
"eslint-config-node-important-stuff": "^1.1.0",
2530
"husky": "^7.0.0",
2631
"mocha": "^9.0.2",
2732
"prettier": "^2.1.2",

0 commit comments

Comments
 (0)