Skip to content

Commit

Permalink
Merge pull request #6 from CanopyTax/v3.0.0
Browse files Browse the repository at this point in the history
Add typescript support v3.0.0
  • Loading branch information
parkm authored Nov 10, 2023
2 parents 96e5630 + 506356a commit 425bfcb
Show file tree
Hide file tree
Showing 3 changed files with 597 additions and 8 deletions.
10 changes: 8 additions & 2 deletions lint-config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module.exports = {
"plugins": [
"react-hooks"
"react-hooks", "react", "@typescript-eslint"
],

"parser": "babel-eslint",
"extends": ["plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",

"parserOptions": {
"sourceType": "module",
Expand Down Expand Up @@ -44,6 +45,7 @@ module.exports = {

"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",

// Possible Errors
"no-console": [2, {allow: ["warn", "error", "info"]}], // sometimes console warnings or console errors are helpful, but console.log probably shouldn't be checked into source control (?)
Expand Down Expand Up @@ -87,5 +89,9 @@ module.exports = {
"no-dupe-class-members": 2,
"no-duplicate-imports": 2,
"no-this-before-super": 2,

// Typescript
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": 0
},
}
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
{
"name": "eslint-config-canopy",
"version": "2.3.0",
"version": "3.0.0",
"description": "A standard eslint configuration for Canopy frontend developers",
"main": "lint-config.js",
"repository": "[email protected]:front-end/canopy-eslint.git",
"license": "Apache-2.0",
"dependencies": {
"eslint-plugin-react-hooks": "^1.0.0"
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@babel/preset-typescript": "^7.23.2",
"eslint-plugin-react-hooks": "^4.6.0"
},
"peerDependencies": {
"typescript": "~5.0.0"
}
}
Loading

0 comments on commit 425bfcb

Please sign in to comment.