Skip to content
This repository has been archived by the owner on May 2, 2020. It is now read-only.

Commit

Permalink
closes #628
Browse files Browse the repository at this point in the history
  • Loading branch information
scriptPilot authored and scriptPilot committed Oct 27, 2017
1 parent 2f6f37e commit eab7b21
Show file tree
Hide file tree
Showing 13 changed files with 513 additions and 178 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ database-backup.json
# Exclude FTP config file
ftp-config.json

# Exclude ESLint configuration file
.eslintrc

3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ database-backup.json
# Exclude FTP config file
ftp-config.json

# Exclude ESLint configuration file
.eslintrc

# Exclude Build folder
build/

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
## Next version

### New Features

- [x] [#628 - Overriding StandardJS rules](https://github.com/scriptPilot/app-framework/issues/628) ([read the docs](https://github.com/scriptPilot/app-framework/blob/master/docs/eslint.md))

### Improvements

- [x] [#572 - Rename database-rules.json to firebase-database.json](https://github.com/scriptPilot/app-framework/issues/572)
Expand Down
1 change: 1 addition & 0 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ For any open question, feature request or bug, please use our [issue list](https
- [Application style](docs/application-style.md)
- [Status bar style](docs/status-bar-style.md)
- [Test your application](docs/test.md)
- [Configure ESLint code checks](docs/eslint.md)
- [Build your application](docs/build.md)
- [Deploy your application](docs/deploy.md)
- [Backup your project](docs/backup.md)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Develop your application:s

Test your application:

- Integrated code check for [correctness](http://eslint.org/) and automatic fix for [standard conformity](http://standardjs.com/)
- Integrated configurable code check and fix with [ESLint](http://eslint.org/), based on [Airbnb](https://github.com/airbnb/javascript) or [Standard JavaScript](http://standardjs.com/)
- Local development server with live reload, perfectly to use together with [Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/)
- Test your application on any iOS or Android device with an emulator or on your own device
- Use a development Firebase project with automatic [database](https://firebase.google.com/products/database/) and [storage](https://firebase.google.com/products/storage/) rule update
Expand Down
14 changes: 14 additions & 0 deletions config-scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,20 @@
"type": "boolean",
"default": false
},
"eslint": {
"props": {
"extends": {
"allow": ["airbnb", "standard"],
"default": "airbnb"
},
"rules": {
"type": "object",
"default": {
"semi": ["error", "never"]
}
}
}
},
"fixCodeOnTest": {
"type": "boolean",
"default": true
Expand Down
4 changes: 4 additions & 0 deletions demo/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
"resetLocalStorageOnVersionChange": false,
"preloadImages": true,
"buildSourcemaps": false,
"eslint": {
"extends": "standard",
"rules": {}
},
"fixCodeOnTest": true,
"fixCodeOnBuild": true,
"devServerPort": "8080"
Expand Down
4 changes: 2 additions & 2 deletions docs/dev-coding-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ let names = 'everything but no array' /* test */
...
```

## Standard JavaScript
## Airbnb JavaScript rules

All code is checked according [Standard JS rules](http://standardjs.com/) before each build.
All code is checked according [Airbnb JavaScript rules](https://github.com/airbnb/javascript) (but without semicolons) before each build.

## Naming in code

Expand Down
32 changes: 32 additions & 0 deletions docs/eslint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ESLint code checks

> This page is part of the [App Framework Documentation](../DOCUMENTATION.md)
<br />

The code is checked with ESLint. You can apply your own configuration easily in the *app/config.json* file. The *.eslintrc* file will be updated before each test according your configuration.

The new default configuration:

```
"eslint": {
"extends": "airbnb",
"rules": {
"semi": [
"error",
"never"
]
}
}
```

The old default configuration:

```
"eslint": {
"extends": "standard",
"rules": {}
}
```

Currently, `airbnb` and `standard` are available to extend - if you which to extend another shared configuration, please ask for it in our [issue list](https://github.com/scriptPilot/app-framework/issues).
Loading

0 comments on commit eab7b21

Please sign in to comment.