-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ac1f3d
commit 38e5acb
Showing
9 changed files
with
1,176 additions
and
1,392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
dist | ||
coverage | ||
.prettierignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
# Changelog | ||
|
||
## v2.0.0 | ||
|
||
Support for `createClass` has been dropped. Usage of `createClass` will no longer be detected. | ||
|
||
Now errors on any JSX usage within a `class`. Previously the below was not caught: | ||
|
||
```jsx | ||
import Document from "next/document"; | ||
|
||
class MyDocument extends Document { | ||
render() { | ||
<>...</>; | ||
} | ||
} | ||
``` | ||
|
||
## v1.0.0 | ||
|
||
No API changes. This library will now follow [semantic versioning](https://docs.npmjs.com/about-semantic-versioning). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"name": "eslint-plugin-react-prefer-function-component", | ||
"version": "1.0.0", | ||
"description": "ESLint lint rule to enforce function components in React", | ||
"name": "eslint-plugin-react-prefer-function-component-development", | ||
"description": "ESLint plugin that prevents the use of JSX class components", | ||
"license": "MIT", | ||
"author": "Tate <[email protected]>", | ||
"homepage": "https://github.com/tatethurston/eslint-plugin-react-prefer-function-component#readme", | ||
|
@@ -12,11 +11,6 @@ | |
"bugs": { | ||
"url": "https://github.com/tatethurston/eslint-plugin-react-prefer-function-component/issues" | ||
}, | ||
"main": "dist/index.js", | ||
"files": [ | ||
"dist/index.d.ts", | ||
"dist/prefer-function-component/index.js" | ||
], | ||
"scripts": { | ||
"build": "yarn clean && yarn tsc", | ||
"build:watch": "yarn build --watch", | ||
|
@@ -26,39 +20,35 @@ | |
"lint:fix:md": "prettier --write '*.md'", | ||
"lint:fix:package": "prettier-package-json --write package.json", | ||
"lint:fix:ts": "eslint --fix './src/**/*.ts{,x}'", | ||
"package:build": "yarn build && yarn package:prune && yarn package:copy:files", | ||
"package:copy:files": "cp ./LICENSE ./README.md dist/ && cp ./public.package.json dist/package.json", | ||
"package:prune": "find dist -name test.* -delete", | ||
"test": "yarn jest src/*", | ||
"test:ci": "yarn test --coverage", | ||
"typecheck": "yarn tsc --noEmit", | ||
"typecheck:watch": "yarn typecheck --watch" | ||
}, | ||
"types": "dist/index.d.ts", | ||
"devDependencies": { | ||
"@babel/preset-env": "^7.14.1", | ||
"@babel/preset-env": "^7.17.10", | ||
"@babel/preset-react": "^7.13.13", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@types/eslint": "^8.4.0", | ||
"@types/estree": "^0.0.50", | ||
"@types/jest": "^27.4.0", | ||
"@types/node": "^17.0.10", | ||
"@typescript-eslint/eslint-plugin": "^5.10.0", | ||
"@typescript-eslint/parser": "^5.10.0", | ||
"@types/eslint": "^8.4.1", | ||
"@types/estree": "^0.0.51", | ||
"@types/jest": "^27.4.1", | ||
"@types/node": "^17.0.30", | ||
"@typescript-eslint/eslint-plugin": "^5.21.0", | ||
"@typescript-eslint/parser": "^5.21.0", | ||
"codecov": "^3.8.3", | ||
"eslint": "^8.7.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-react": "^7.28.0", | ||
"eslint-plugin-react-hooks": "^4.3.0", | ||
"eslint": "^8.14.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-react": "^7.29.4", | ||
"eslint-plugin-react-hooks": "^4.5.0", | ||
"husky": "^4.3.0", | ||
"jest": "^27.4.7", | ||
"prettier": "^2.5.1", | ||
"prettier-package-json": "^2.6.0", | ||
"typescript": "^4.5.5" | ||
"jest": "^28.0.3", | ||
"prettier": "^2.6.2", | ||
"prettier-package-json": "^2.6.3", | ||
"typescript": "^4.6.4" | ||
}, | ||
"keywords": [ | ||
"eslint react no class", | ||
"react function component", | ||
"react functional component", | ||
"react no class" | ||
], | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "yarn lint" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "eslint-plugin-react-prefer-function-component", | ||
"version": "2.0.0-rc1", | ||
"description": "ESLint plugin that prevents the use of JSX class components", | ||
"license": "MIT", | ||
"author": "Tate <[email protected]>", | ||
"homepage": "https://github.com/tatethurston/eslint-plugin-react-prefer-function-component#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tatethurston/eslint-plugin-react-prefer-function-component.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/tatethurston/eslint-plugin-react-prefer-function-component/issues" | ||
}, | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"keywords": [ | ||
"eslint react no class", | ||
"eslint react class", | ||
"lint react no class", | ||
"lint react class", | ||
"lint jsx no class", | ||
"lint jsx class" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.