Skip to content

Commit 73b4739

Browse files
balazsorban44ijjk
andauthored
chore: add build step to eslint-plugin-next (vercel#38647)
Follow-up on vercel#38534 (review) This lets us use modern JS/TS syntax in ESLint rules and avoid issues like vercel#38530 and vercel#36693 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples) Co-authored-by: JJ Kasper <[email protected]>
1 parent 05c2fe0 commit 73b4739

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+81
-70
lines changed

packages/eslint-plugin-next/.swcrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://json.schemastore.org/swcrc",
3+
"jsc": {
4+
"parser": {
5+
"syntax": "typescript"
6+
}
7+
},
8+
"module": {
9+
"type": "commonjs"
10+
}
11+
}

packages/eslint-plugin-next/lib/rules/no-img-element.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

packages/eslint-plugin-next/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,23 @@
22
"name": "@next/eslint-plugin-next",
33
"version": "12.3.2-canary.15",
44
"description": "ESLint plugin for NextJS.",
5-
"main": "lib/index.js",
5+
"main": "dist/index.js",
66
"license": "MIT",
77
"repository": {
88
"url": "vercel/next.js",
99
"directory": "packages/eslint-plugin-next"
1010
},
1111
"files": [
12-
"lib"
12+
"dist"
1313
],
1414
"dependencies": {
1515
"glob": "7.1.7"
1616
},
1717
"devDependencies": {
18-
"@types/eslint": "7.28.0"
18+
"eslint": "7.24.0"
19+
},
20+
"scripts": {
21+
"build": "swc -d dist src",
22+
"prepublishOnly": "cd ../../ && turbo run build"
1923
}
2024
}

0 commit comments

Comments
 (0)