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

Commit 2a88330

Browse files
author
Jeremy Wiebe
committed
Merge branch 'develop' into es6-naming
2 parents 4fbe44e + 3d8e538 commit 2a88330

File tree

13 files changed

+461
-129
lines changed

13 files changed

+461
-129
lines changed

CHANGELOG

Lines changed: 0 additions & 95 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
## v2.8.2 (May 10, 2017)
2+
- Provided more detailed linting error message in copyright header tool
3+
4+
## v2.8.1 (May 8, 2017)
5+
- Fixes whitespace / newline management in copyright tool
6+
- Fix to additional space added when --update flag passed into copyright tool
7+
8+
## v2.8.0 (May 5, 2017)
9+
- Adds new copyright-header management tool
10+
11+
## v2.7.4 (February 2, 2017)
12+
- Add new classname prefixes to CSS documentation: `pw-` and `qa-`
13+
- Add links to alternative CSSComb text editor plugins
14+
- Fix `lint-md` to work properly on Node.js v6+
15+
16+
## v2.7.3
17+
- Temporarily disable `spaced-comment` errors, until Astro release builds comply
18+
with this rule.
19+
20+
## v2.7.2
21+
- Temporarily downgrade `spaced-comment` errors to warning level, until Astro
22+
release builds comply with this rule.
23+
24+
## v2.7.1
25+
- Re-organized and cleaned up markdown linting files
26+
- Switched to using `no-duplicate-headings-in-section` (instead of
27+
`no-duplicate-headings`)
28+
- Add `spaced-comment` rule enforcement to ES5 and legacy (ESLint 1.x or lower)
29+
linting [#132](https://github.com/mobify/mobify-code-style/pull/132)
30+
31+
## v2.7.0
32+
- Remove `variable-for-property` rule from sass-lint
33+
- Adds markdown linting via `lint-md` script
34+
- Add ESLint and Atom Text integration how-to doc
35+
36+
## v2.6.0
37+
- Remove `variable-for-property` rule from sass-lint
38+
[#126](https://github.com/mobify/mobify-code-style/pull/126)
39+
- Add the eslint jsx-a11y plugin through a new `mobify-es6-react-a11y`
40+
configuration [#129](https://github.com/mobify/mobify-code-style/pull/129)
41+
42+
## v2.5.3
43+
- Fix #123 by using react/jsx-wrap-multilines rule
44+
- Migrate CSSComb documentation from Confluence to code style repo
45+
46+
## v2.5.2
47+
- Fix #43 by updating all underlines in Sass code examples
48+
- Fix #114 by removing invalid options from CSSComb config file
49+
- Add a React rule to make sure propTypes are ordered, required ones declared
50+
first and callbacks (e.g. onChange) declared last.
51+
- Update ES6 indent rule on switch statements
52+
- Add ignore patterns for unused vars/args to the React configuration
53+
- Ignore non-JS files and node\_modules in the ES6 import module
54+
- Add a new ES5 configuration ported to ESLint 2 and up
55+
56+
## v2.5.1
57+
- Update line length to 200
58+
- Remove rule for no-unresolved import
59+
- Remove 'strict' rule for modules
60+
61+
## v2.5.0
62+
- Add an ES6 and JSX standard with lint rules.
63+
64+
## v2.4.4
65+
- Add a template for code-style PRs
66+
- Go meta! Add some templates of GitHub templates for contributing, issues, and
67+
PRs that can be used on other Mobify repos
68+
69+
## v2.4.3
70+
- Add eslint rule + doc entry regarding trailing commas
71+
72+
## v2.4.2
73+
- Add/update documentation for Sass-Lint
74+
75+
## v2.4.1
76+
- Fix some bugs with sass-lint config
77+
78+
## v2.4.0
79+
- Add a sass-lint config file
80+
81+
## v2.3.7
82+
- Add Writing Checklist
83+
- Fix doc error wrt function expression hoisting
84+
- Add some more JS code style to the docs
85+
86+
## v2.3.6
87+
- Change CSScomb rule: null leading-zero rule due to CSScomb bug
88+
89+
## v2.3.5
90+
- Add Sass documentation about placeholders and `@extends`
91+
- Add CSS documentation on l10n and i18n best practices
92+
93+
## v2.3.4
94+
- Patch CSSComb and scss-lint rules for compatibility
95+
- LeadingZero aligned to enabled
96+
- Tweaked property ordering
97+
- NameFormat to match BEM
98+
- NestingDepth upped to 4
99+
- color and background-color properties no longer require explicit Sass
100+
variables
101+
102+
## v2.3.3
103+
- Change scss-lint rule: disable the quotes rules
104+
- Change CSScomb rule: disable the quotes rules
105+
106+
## v2.3.2
107+
- Update documentation: "Tools & Frameworks" section in the CSS introduction
108+
109+
## v2.3.1
110+
- Add an eslint config file for production-ready JS
111+
112+
## v2.3.0
113+
- Add CSSComb
114+
- Update documentation
115+
- Update SCSS-lint to 0.42.2
116+
117+
## v2.2.4
118+
- Remove the unnecessary parens rule
119+
120+
## v2.2.3
121+
- Restrict the unnecessary parens rule to functions
122+
123+
## v2.2.2
124+
- Remove enforcement of 'max-statements' and 'max-params' JS rules
125+
126+
## v2.2.1
127+
- Cumulative patch release
128+
- Update SCSS-lint to 0.40.1
129+
130+
## v2.2.0
131+
- Fixes eslint config to play nicely with Atom's linter-eslint package
132+
- Adds an eslint config reset file so that our ruleset is an override
133+
134+
## v2.1.1
135+
- Re-publish to work-around NPM issue
136+
137+
## v2.1.0
138+
- Add new rules to .eslintrc to closer match our JS style guidelines.
139+
140+
## v2.0.1
141+
- Adds .eslintrc to allow usage of ESLint
142+
- Adds Java code style guide
143+
- Updates to CSS hybrid project conventions

README.md

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Mobify Code Style
22

3-
A repo to document code standards for different languages and provide tools for linting Mobify projects.
3+
A repo to document code standards for different languages and provide tools for
4+
linting Mobify projects.
45

56
[![NPM version](https://badge.fury.io/js/mobify-code-style.svg)](http://badge.fury.io/js/mobify-code-style)
67
[![CircleCI](https://circleci.com/gh/mobify/mobify-code-style/tree/develop.svg?style=svg)](https://circleci.com/gh/mobify/mobify-code-style/tree/develop)
@@ -14,11 +15,12 @@ is a Grunt helper for the [ESLint](http://eslint.org/) linter.
1415

1516
To add javascript linting to your project:
1617

17-
1. Install the NPM `mobify-code-style` and `grunt-eslint` modules.
18-
2. Create a [Gruntfile](http://gruntjs.com/sample-gruntfile) if you
19-
don't have one already.
20-
3. Create an `.eslintrc.yml` file in the root of your project directory
21-
4. In the initConfig of your gruntfile, add a section for eslint pointing to the correct linting file.
18+
1. Install the NPM `mobify-code-style` and `grunt-eslint` modules.
19+
2. Create a [Gruntfile](http://gruntjs.com/sample-gruntfile) if you don't have
20+
one already.
21+
3. Create an `.eslintrc.yml` file in the root of your project directory
22+
4. In the initConfig of your gruntfile, add a section for eslint pointing to the
23+
correct linting file.
2224

2325
The `.eslintrc.yml` file should contain, to begin with:
2426
```yaml
@@ -55,12 +57,15 @@ with `./.eslintrc.yml`, and add an `.eslintrc.yml` to the project root
5557
as described above.
5658

5759
If there are modifications to the lint configuration in the project,
58-
please check the migration guides at [http://eslint.org/] to port the
59-
modified lint config to ESLint 3.x.
60+
please check the migration guides at [eslint.org](http://eslint.org/) to port
61+
the modified lint config to ESLint 3.x.
6062

6163
## ES6/JSX
6264

63-
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
65+
We use [ESLint](http://eslint.org/) to lint ES6 and React/JSX code. If ESLint is
66+
installed in a project, we can use the configuration from this module by
67+
creating a file in the project root named `.eslintrc.yml`. If the project does
68+
not use JSX, the file contents should be
6469

6570
```yaml
6671
extends:
@@ -84,17 +89,19 @@ settings:
8489
to the `.eslintrc.yml`
8590

8691
Make sure to install the following NPM modules:
87-
- `eslint` > 3.0
88-
- `eslint-plugin-import`
89-
- `eslint-import-resolver-webpack`
90-
- `eslint-plugin-react` (for React/JSX linting only)
92+
- `eslint` > 3.0
93+
- `eslint-plugin-import`
94+
- `eslint-import-resolver-webpack`
95+
- `eslint-plugin-react` (for React/JSX linting only)
9196

9297
## ESLint and Atom
9398

9499
Find out how to integrate [ESLint and Atom Text](./javascript/atom.md).
95100

96101
## CSS
97-
Our Client Services team's [CSS Style Guide](/css/Readme.md). Written with a lot of tender care by @kpeatt and @jeffkamo.
102+
103+
Our Client Services team's [CSS Style Guide](/css/Readme.md). Written with a lot
104+
of tender care by @kpeatt and @jeffkamo.
98105

99106
## Python
100107

@@ -103,4 +110,13 @@ instructions on using `pep8`, `pylint` and `pyflakes` to check Python code.
103110

104111
## Documentation
105112

106-
See the [`docs`](docs) directory for setup and configuration of Markdown linting.
113+
See the [`docs`](docs) directory for setup and configuration of Markdown
114+
linting.
115+
116+
## Copyright Headers
117+
118+
All Mobify source files should contain copyright headers at the beginning of the
119+
file.
120+
121+
See the [`copyright`](copyright) directory for setup and configuration of the
122+
copyright manager tool

RELEASE.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
## Mobify Code Style
2-
- [ ] Branch off of `develop` and create a `release-vX.Y.Z` branch.
3-
- [ ] Create a new pull request with the following settings:
4-
* Base: `master`
5-
* Compare: `release-vX.Y.Z`
6-
Paste the contents of this checklist into this pull request.
7-
- [ ] Increment the version in `package.json`.
8-
- [ ] In the CHANGELOG.md file of this release branch, change the 'To be released' header to 'vX.Y.Z'.
9-
- [ ] Merge `release-vX.Y.Z` into `master` using the pull request, then delete the release branch.
10-
- [ ] [Publish to npm](https://docs.npmjs.com/cli/publish) from the `master` branch.
11-
- [ ] Draft a new Github release with the following settings:
12-
* Tag version: `X.Y.Z` @ `master`
13-
* Release title: `X.Y.Z`
14-
* Description: Use highlights from the CHANGELOG.md (only pick out the most significant changes)
15-
- [ ] Merge `master` into `develop` (no need for review on PR, just merge).
1+
# Mobify Code Style - Release process
2+
3+
Use Slack to release new versions of the Mobify Code Style.
4+
5+
`@mobitron release mobify-code-style [minor|patch]`
6+
7+
The release script will create the release and prep the npm package. Near the
8+
end it merges a release branch in `master` which kicks off `circle.yml`. The
9+
final npm publish step is done within the circle.yml file.

circle.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: node:6.10.3
6+
working_directory: /home/ubuntu/mobify-code-style
7+
steps:
8+
- checkout
9+
- run: npm install
10+
# npm outputs extra info on... ?linux? that breaks the diffs in docs/test/
11+
# test.sh causing tests to fail on CircleCI only, but not on a macOS. As a
12+
# result we use `--quiet` to suppress this npm output.
13+
- run: npm test --quiet
14+
- deploy:
15+
command: |
16+
if [ "${CIRCLE_BRANCH}" == "master" ]; then
17+
# NPM login based on env variables
18+
echo -e "$NPM_USERNAME\n$NPM_PASSWORD\n$NPM_EMAIL" | npm login
19+
npm publish
20+
fi

0 commit comments

Comments
 (0)