Skip to content

Commit fc334a7

Browse files
authored
Merge pull request #112 from humpbackdev/feature/update-eslint-add-babel
Update eslint / Add babel
2 parents 217c965 + 6597e95 commit fc334a7

File tree

12 files changed

+294
-277
lines changed

12 files changed

+294
-277
lines changed

generators/app/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,16 @@ module.exports = class extends Generator {
228228
this.templatePath('editorconfig'),
229229
this.destinationPath('.editorconfig')
230230
);
231-
this.fs.copy(this.templatePath('eslintrc'), this.destinationPath('.eslintrc'));
231+
this.fs.copy(
232+
this.templatePath('eslintrc.json'),
233+
this.destinationPath('.eslintrc.json')
234+
);
235+
this.fs.copy(this.templatePath('babelrc'), this.destinationPath('.babelrc'));
236+
this.fs.copy(this.templatePath('nvmrc'), this.destinationPath('.nvmrc'));
237+
this.fs.copy(
238+
this.templatePath('prettierrc.json'),
239+
this.destinationPath('.prettierrc.json')
240+
);
232241
this.fs.copy(
233242
this.templatePath('gitattributes'),
234243
this.destinationPath('.gitattributes')

generators/app/templates/_package.json

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,42 @@
22
"name": "<%= appName %>",
33
"private": true,
44
"devDependencies": {
5-
"gulp": "^4.0.0",
6-
"gulp-eslint": "^2.0.0",
7-
"gulp-if": "^2.0.0",
8-
"gulp-task-listing": "^1.0.1",
9-
"gulp-util": "^3.0.1",
10-
"minimist": "^1.2.0",
5+
"@babel/core": "^7.9.6",
6+
"@babel/preset-env": "^7.9.6",
7+
"ansi-colors": "^4.1.1",
8+
"chalk": "^4.0.0",
9+
"chokidar": "^3.4.0",
10+
"cross-env": "^7.0.2",
11+
"eslint": "^6.8.0",
12+
"eslint-config-airbnb": "^18.1.0",
13+
"eslint-config-prettier": "^6.11.0",
14+
"eslint-plugin-import": "^2.20.1",
15+
"eslint-plugin-jsx-a11y": "^6.2.3",
16+
"eslint-plugin-prettier": "^3.1.3",
17+
"eslint-plugin-react": "^7.19.0",
18+
"eslint-plugin-react-hooks": "^2.5.0",
19+
"fancy-log": "^1.3.3",
20+
"glob": "^7.1.6",
21+
"gulp": "^4.0.2",
22+
"gulp-babel": "^8.0.0",
23+
"gulp-eslint": "^6.0.0",
24+
"gulp-if": "^3.0.0",
25+
"gulp-print": "^5.0.2",
26+
"gulp-rename": "^2.0.0",
27+
"gulp-task-listing": "^1.1.0",
28+
"minimist": "^1.2.5",
1129
"phplint": "^2.0.1",
12-
"require-dir": "^0.3.0",
30+
"plugin-error": "^1.0.1",
31+
"prettier": "^2.0.5",
32+
"require-dir": "^1.2.0",
1333
"sync-exec": "^0.6.2",
14-
"through2": "^2.0.0"
34+
"through2": "^3.0.1"
1535
},
1636
"dependencies": {},
1737
"scripts": {
1838
"gulp": "gulp",
19-
"test": "gulp phplint && gulp drupalcs && gulp eslint"
39+
"test": "gulp phplint && gulp drupalcs && gulp eslint",
40+
"build:js": "gulp build:js",
41+
"watch:js": "gulp watch:js"
2042
}
2143
}

generators/app/templates/babelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env"
5+
]
6+
]
7+
}

generators/app/templates/eslintrc

Lines changed: 0 additions & 94 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./web/core/.eslintrc.json"
3+
}

0 commit comments

Comments
 (0)