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

Commit ef3e05b

Browse files
authored
Merge pull request #142 from mobify/npm-auto-publish
Slack publish (was "npm auto publish")
2 parents 79fc65a + 6021693 commit ef3e05b

File tree

6 files changed

+190
-131
lines changed

6 files changed

+190
-131
lines changed

CHANGELOG

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

CHANGELOG.md

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

README.md

Lines changed: 27 additions & 18 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,11 +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.
107-
113+
See the [`docs`](docs) directory for setup and configuration of Markdown
114+
linting.
108115

109116
## Copyright Headers
110117

111-
All Mobify source files should contain copyright headers at the beginning of the file.
118+
All Mobify source files should contain copyright headers at the beginning of the
119+
file.
112120

113-
See the [`copyright`](copyright) directory for setup and configuration of the copyright manager tool
121+
See the [`copyright`](copyright) directory for setup and configuration of the
122+
copyright manager tool

RELEASE.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
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]`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"homepage": "https://github.com/mobify/mobify-code-style",
1919
"scripts": {
20-
"test": "cd docs/test; bash test.sh"
20+
"test": "scripts/test.sh"
2121
},
2222
"dependencies": {
2323
"glob": "^7.1.1",

scripts/test.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash -eu
2+
# -e Exit immediately if a command exits with a non-zero status.
3+
# -u Treat unset variables as an error when substituting.
4+
# More info can be found by typing `help set` in any bash shell
5+
6+
# the return value of a pipeline is the status of the last command to exit with a non-zero status, or zero if no command exited with a non-zero status
7+
set -o pipefail
8+
9+
# Identifies the path that the script is in (http://stackoverflow.com/a/246128/11807)
10+
MYPATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
11+
12+
# ROOT is the root directory of your project. It isn't always needed if your script is at the root of your project, but its a useful convention to adopt so that your scripts can be moved and the only thing that needs to change then is ROOT.
13+
ROOT=$MYPATH/..
14+
15+
# We have to `cd` into the dir otherwise the diffs that we use for testing
16+
# fail due to paths of the test files not matching.
17+
pushd "$ROOT/docs/test"
18+
bash test.sh
19+
popd
20+
21+
"$ROOT/docs/bin/lint-md" "$ROOT/*.md"

0 commit comments

Comments
 (0)