2c672c1d81
In #38647, @balazsorban44 has migrated the rule `no-img-element` to typescript. The PR follows #38647 by migrating the entire `eslint-plugin-next` to use typescript. Note it is still possible to write new rules in javascript. The PR does the following things: - Migrates all `utils` to typescript - All previous JSDoc are also converted to the type definitions - Creates a utility method `defineRule` - This is a stub function to provide the type check ability. - With the `defineRule` we don't have to tediously import type definition `Rule.RuleMetaData` and `Rule.RuleModule['create']` from `eslint` anymore, `defineRule` will provide auto-complete and typechecking for `meta` and `create`. - Migrates all rules to typescript - Extra type guards are also added to make typescript happy. All existing `eslint-config-next` unit test cases passed after the migration.
25 lines
524 B
JSON
25 lines
524 B
JSON
{
|
|
"name": "@next/eslint-plugin-next",
|
|
"version": "12.3.2-canary.15",
|
|
"description": "ESLint plugin for NextJS.",
|
|
"main": "dist/index.js",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"url": "vercel/next.js",
|
|
"directory": "packages/eslint-plugin-next"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"dependencies": {
|
|
"glob": "7.1.7"
|
|
},
|
|
"devDependencies": {
|
|
"@types/glob": "7.1.1",
|
|
"eslint": "7.24.0"
|
|
},
|
|
"scripts": {
|
|
"build": "swc -d dist src",
|
|
"prepublishOnly": "cd ../../ && turbo run build"
|
|
}
|
|
}
|