Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 6378d9b

Browse files
author
Mike Klemarewski
authored
Merge pull request #109 from mobify/release-2.5.0
Release 2.5.0
2 parents 538dee9 + 19680ba commit 6378d9b

File tree

6 files changed

+663
-2
lines changed

6 files changed

+663
-2
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2.5.0
2+
- Add an ES6 and JSX standard with lint rules.
13
2.4.4
24
- Add a template for code-style PRs
35
- Go meta! Add some templates of GitHub templates for contributing, issues, and PRs that can be used on other Mobify repos

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A repo to document code standards for different languages and provide tools for
44

55
[![NPM version](https://badge.fury.io/js/mobify-code-style.svg)](http://badge.fury.io/js/mobify-code-style)
66

7-
## JavaScript
7+
## JavaScript (ES5)
88

99
Typically, we lint our javascript files using [Grunt](http://gruntjs.com/) and [grunt-eslint](https://github.com/sindresorhus/grunt-eslint). grunt-eslint is a Grunt helper for the [ESLint](http://eslint.org/) linter.
1010

@@ -29,6 +29,29 @@ eslint:{
2929
}
3030
}
3131
```
32+
33+
## ES6/JSX
34+
35+
We use [ESLint](http://eslint.org/) to lint ES6 and React/JSX code. If ESLint is installed in a project, we can use the configuration from this module by creating a file in the project root named `.eslintrc.yml`. If the project does not use JSX, the file contents should be
36+
37+
```yaml
38+
extends:
39+
- './node_modules/mobify-code-style/es6/mobify-es6.yml'
40+
```
41+
42+
and for a React/JSX project:
43+
44+
```yaml
45+
extends:
46+
- './node_modules/mobify-code-style/es6/mobify-es6-react.yml'
47+
```
48+
49+
Make sure to install the following NPM modules:
50+
- `eslint` > 3.0
51+
- `eslint-plugin-import`
52+
- `eslint-import-resolver-webpack`
53+
- `eslint-plugin-react` (for React/JSX linting only)
54+
3255
## CSS
3356
Our Client Services team's [CSS Style Guide](/css/Readme.md). Written with a lot of tender care by @kpeatt and @jeffkamo.
3457

0 commit comments

Comments
 (0)