Skip to content

Commit e329aba

Browse files
andyflemingjpage-godaddy
authored andcommitted
Add TypeScript flavor packages for ESLint (#89)
Add TypeScript lint packages
1 parent ec02098 commit e329aba

File tree

24 files changed

+3112
-166
lines changed

24 files changed

+3112
-166
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# godaddy-style
22

3-
Official GoDaddy JavaScript styleguide. It includes `eslint` packages for three use-cases and can be used as a standard in any new project.
3+
Official GoDaddy JavaScript styleguide. It includes `eslint` packages for various use-cases and can be used as a standard in any new project.
44

55
- [`eslint-config-godaddy`]: Base configuration for _non-React_, ES6 JavaScript applications
66
- [`eslint-config-godaddy-react`]: Configuration for ES6 React JavaScript applications
77
- [`eslint-config-godaddy-es5`]: Configuration for React _and_ non-React ES5 JavaScript applications
8+
- [`eslint-config-godaddy-typescript`]: Configuration for ES6 TypeScript applications
9+
- [`eslint-config-godaddy-react-typescript`]: Configuration for ES6 React JavaScript applications
10+
- [`eslint-config-godaddy-flow`]: Configuration for ES6 React JavaScript applications using Flow
811
- [`eslint-config-godaddy-react-flow`]: Configuration for ES6 React JavaScript applications using Flow
912

1013
There are many useful features:
@@ -36,6 +39,15 @@ npm i eslint-config-godaddy-react --save-dev
3639
# OR (legacy ES5 with React rules)
3740
npm i eslint-config-godaddy-es5 --save-dev
3841

42+
# OR (ES6 with TypeScript rules)
43+
npm i eslint-config-godaddy-typescript --save-dev
44+
45+
# OR (ES6 with React and TypeScript rules)
46+
npm i eslint-config-godaddy-react-typescript --save-dev
47+
48+
# OR (ES6 with Flow rules)
49+
npm i eslint-config-godaddy-flow --save-dev
50+
3951
# OR (ES6 with React and Flow rules)
4052
npm i eslint-config-godaddy-react-flow --save-dev
4153
```
@@ -142,4 +154,7 @@ No problem. Reach out to us by [opening an issue]
142154
[`eslint-config-godaddy`]: /packages/eslint-config-godaddy
143155
[`eslint-config-godaddy-react`]: /packages/eslint-config-godaddy-react
144156
[`eslint-config-godaddy-es5`]: /packages/eslint-config-godaddy-es5
157+
[`eslint-config-godaddy-typescript`]: /packages/eslint-config-godaddy-typescript
158+
[`eslint-config-godaddy-react-typescript`]: /packages/eslint-config-godaddy-react-typescript
159+
[`eslint-config-godaddy-flow`]: /packages/eslint-config-godaddy-react-flow
145160
[`eslint-config-godaddy-react-flow`]: /packages/eslint-config-godaddy-react-flow

package-lock.json

Lines changed: 164 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,22 @@
44
"description": "The approach to JavaScript at GoDaddy. We think it's pretty decent.",
55
"scripts": {
66
"lint": "eslint -c .eslintrc.js packages/**/*.js",
7-
"postinstall": "run-p install:config install:config:es5 install:config:react install:config:react-flow",
7+
"postinstall": "run-p install:config install:config:es5 install:config:flow install:config:react install:config:react-flow install:config:typescript install:config:react-typescript",
88
"install:config": "cd packages/eslint-config-godaddy && npm install",
99
"install:config:es5": "cd packages/eslint-config-godaddy-es5 && npm install",
10+
"install:config:flow": "cd packages/eslint-config-godaddy-flow && npm install",
1011
"install:config:react": "cd packages/eslint-config-godaddy-react && npm install",
1112
"install:config:react-flow": "cd packages/eslint-config-godaddy-react-flow && npm install",
12-
"test": "run-p lint test:config test:config:es5 test:config:react test:config:react-flow",
13+
"install:config:typescript": "cd packages/eslint-config-godaddy-typescript && npm install",
14+
"install:config:react-typescript": "cd packages/eslint-config-godaddy-react-typescript && npm install",
15+
"test": "run-p lint test:config test:config:es5 test:config:flow test:config:react test:config:react-flow test:config:typescript test:config:react-typescript",
1316
"test:config": "cd packages/eslint-config-godaddy && npm test",
1417
"test:config:es5": "cd packages/eslint-config-godaddy-es5 && npm test",
18+
"test:config:flow": "cd packages/eslint-config-godaddy-flow && npm test",
1519
"test:config:react": "cd packages/eslint-config-godaddy-react && npm test",
1620
"test:config:react-flow": "cd packages/eslint-config-godaddy-react-flow && npm test",
21+
"test:config:typescript": "cd packages/eslint-config-godaddy-typescript && npm test",
22+
"test:config:react-typescript": "cd packages/eslint-config-godaddy-react-typescript && npm test",
1723
"prepush": "npm test"
1824
},
1925
"prepush": {
@@ -28,6 +34,7 @@
2834
"keywords": [
2935
"godaddy",
3036
"javascript",
37+
"typescript",
3138
"lint",
3239
"styleguide",
3340
"style-guide",
@@ -50,6 +57,8 @@
5057
"godaddy-js-style-eslint": "./bin/eslint"
5158
},
5259
"devDependencies": {
60+
"@typescript-eslint/eslint-plugin": "^2.3.1",
61+
"@typescript-eslint/parser": "^2.3.1",
5362
"babel-eslint": "^10.0.2",
5463
"eslint": "^6.0.1",
5564
"eslint-find-rules": "^3.3.1",
@@ -60,7 +69,8 @@
6069
"eslint-plugin-mocha": "^5.3.0",
6170
"eslint-plugin-react": "^7.14.2",
6271
"prepush": "^3.1.11",
63-
"react": "^16.8.6"
72+
"react": "^16.8.6",
73+
"typescript": "^3.0"
6474
},
6575
"dependencies": {
6676
"npm-run-all": "^4.0.2"

0 commit comments

Comments
 (0)