Skip to content

Commit eb7584a

Browse files
committed
Add ESLint
1 parent fc96b25 commit eb7584a

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

.eslintrc.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "airbnb",
3+
"plugins": [
4+
"react",
5+
"jsx-a11y",
6+
"import"
7+
]
8+
}

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ To get going clone this repository and perform the following steps:
1212
1. Change application name in `config/application.rb`.
1313
1. Update `database.yml` to reflect the new application name.
1414
1. If you plan on using Figaro, copy `config/application.yml.example` to `config/application.yml`.
15+
1. ESLint is preconfigured for modern JS with React support (AirBnB styleguide). If you want to use
16+
it install packages with `npm install`, otherwise remove `.eslintrc` and `package.json`.
1517
1. If you don't plan on tracking the template, you can remove the `.git` directory.
1618
Otherwise you can rename the remote:
1719
```shell

package.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"name": "rails_new",
33
"private": true,
4-
"dependencies": {}
4+
"dependencies": {},
5+
"devDependencies": {
6+
"eslint": "^3.19.0",
7+
"eslint-config-airbnb": "^15.0.1",
8+
"eslint-plugin-import": "^2.2.0",
9+
"eslint-plugin-jsx-a11y": "^5.0.3",
10+
"eslint-plugin-react": "^7.0.1"
11+
}
512
}

scripts/setup

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ printf "Please update the following locations:\n\n"
3030
fgrep -rn "TODO:" app config spec | while read -r line ; do
3131
echo " * $line"
3232
done
33+
echo " * Update project name in package.json"
3334

3435

3536

0 commit comments

Comments
 (0)