├── .editorconfig
├── .eslintignore
├── .eslintrc.json
├── .github
└── workflows
│ ├── nlm.yml
│ ├── node.js.yml
│ └── npm-publish.yml
├── .gitignore
├── .npmrc
├── .nvmrc
├── .stylintrc
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── examples
└── eslint
│ ├── node10
│ ├── for-await-of.js
│ ├── module.mjs
│ ├── package.json
│ └── regexp-capture-group.js
│ └── node12
│ ├── .eslintrc.json
│ ├── bar.ts
│ ├── error-h.js
│ ├── error-h.js.json
│ ├── errorless-h.jsx
│ ├── foo.test.js
│ ├── node_modules
│ └── preact
│ │ └── index.js
│ ├── object-from-entries.js
│ └── package.json
├── lib
├── basics.js
├── index.js
├── rules
│ ├── conventions.js
│ ├── mistakes.js
│ ├── opinions.js
│ └── overrides.js
└── typescript.js
├── package-lock.json
├── package.json
├── test
└── lint.test.js
├── tsconfig.json
└── typescript.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | indent_size = 2
6 | charset = utf-8
7 | trim_trailing_whitespace = true
8 | insert_final_newline = true
9 |
10 | [*.md]
11 | trim_trailing_whitespace = false
12 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | tmp
2 | node_modules/
3 | .git
4 | /examples
5 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./",
3 | "overrides": [
4 | {
5 | "files": "*.test.*",
6 | "env": {
7 | "mocha": true
8 | }
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/.github/workflows/nlm.yml:
--------------------------------------------------------------------------------
1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3 |
4 | name: NLM
5 |
6 | on:
7 | pull_request:
8 |
9 | jobs:
10 | tag:
11 | runs-on: ubuntu-latest
12 |
13 | steps:
14 | - uses: actions/checkout@v2
15 | with:
16 | fetch-depth: 0 # necessary to get full commit history
17 | - name: Use Node.js
18 | uses: actions/setup-node@v2
19 | with:
20 | node-version: 16
21 | - run: npm ci
22 | - run: npx nlm verify
23 | env:
24 | GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
25 |
--------------------------------------------------------------------------------
/.github/workflows/node.js.yml:
--------------------------------------------------------------------------------
1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3 |
4 | name: Node.js CI
5 |
6 | on:
7 | push:
8 |
9 | jobs:
10 | build:
11 | runs-on: ubuntu-latest
12 |
13 | strategy:
14 | matrix:
15 | node-version: [12.x, 14.x, 16.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
16 |
17 | steps:
18 | - uses: actions/checkout@v2
19 | - name: Use Node.js ${{ matrix.node-version }}
20 | uses: actions/setup-node@v2
21 | with:
22 | node-version: ${{ matrix.node-version }}
23 | - run: npm ci
24 | - run: npm run build --if-present
25 | - run: npm test
26 |
--------------------------------------------------------------------------------
/.github/workflows/npm-publish.yml:
--------------------------------------------------------------------------------
1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3 |
4 | name: Publish to NPM
5 |
6 | on:
7 | push:
8 | branches: [ main ]
9 |
10 | jobs:
11 | build:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - uses: actions/checkout@v2
15 | - uses: actions/setup-node@v2
16 | with:
17 | node-version: 16
18 | - run: npm ci
19 | - run: npm test
20 |
21 | publish-npm:
22 | needs: build
23 | runs-on: ubuntu-latest
24 | steps:
25 | - uses: actions/checkout@v2
26 | with:
27 | fetch-depth: 0
28 | - uses: actions/setup-node@v2
29 | with:
30 | node-version: 16
31 | - run: npm ci
32 | - run: npx nlm release
33 | env:
34 | GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
35 | NPM_TOKEN: ${{secrets.NPM_TOKEN}}
36 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | coverage
2 | node_modules/
3 | npm-debug.log
4 | /tmp
5 | /npm-debug.log
6 | /.nyc_output
7 | /target
8 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | ignore-engines=true
2 | registry=https://registry.npmjs.org
3 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 10
2 |
--------------------------------------------------------------------------------
/.stylintrc:
--------------------------------------------------------------------------------
1 | node_modules/stylint-config-groupon/stylint.json
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ### v11.1.0 (2022-04-01)
2 |
3 | #### 🏡 Internal
4 |
5 | * [#61](https://github.com/groupon/javascript/pull/61) ignore h & React in jsx files ([@dbushong](https://github.com/dbushong))
6 |
7 |
8 | ### v11.0.6 (2022-03-16)
9 |
10 | #### 🏡 Internal
11 |
12 | * [#60](https://github.com/groupon/javascript/pull/60) rollback ecmaVersion to 2020 ([@dbushong](https://github.com/dbushong))
13 |
14 |
15 | ### v11.0.5 (2022-02-02)
16 |
17 | #### 🏡 Internal
18 |
19 | * [#59](https://github.com/groupon/javascript/pull/59) upgrades for npm audit ([@dbushong](https://github.com/dbushong))
20 |
21 |
22 | ### v11.0.4 (2022-02-02)
23 |
24 | #### 🏡 Internal
25 |
26 | * [#57](https://github.com/groupon/javascript/pull/57) always use latest ecmaVersion ([@dbushong](https://github.com/dbushong))
27 |
28 |
29 | ### v11.0.3 (2021-11-22)
30 |
31 | #### 🏡 Internal
32 |
33 | * [#56](https://github.com/groupon/javascript/pull/56) lower peerDep req for typescript-eslint ([@dbushong](https://github.com/dbushong))
34 |
35 |
36 | ### v11.0.2 (2021-11-08)
37 |
38 | #### 🐛 Bug Fixes
39 |
40 | * [`3bc4a85`](https://github.com/groupon/javascript/commit/3bc4a8595a2dd9117e7c244de8b8fc49a4f83038) fix: wrong typescript peerDep
41 |
42 |
43 | ### v11.0.1 (2021-11-08)
44 |
45 | #### 🏡 Internal
46 |
47 | * [#55](https://github.com/groupon/javascript/pull/55) modify ts lint rules to coexist better with js ([@dbushong](https://github.com/dbushong))
48 |
49 |
50 | ### v11.0.0 (2021-11-05)
51 |
52 | #### 💥 Breaking Changes
53 |
54 | [#54](https://github.com/groupon/javascript/pull/54) upgrades and typescript ([@dbushong](https://github.com/dbushong))
55 |
56 | requires bumping eslint-plugin-prettier to ^4
57 |
58 | #### 🏡 Internal
59 |
60 | * [#54](https://github.com/groupon/javascript/pull/54) upgrades and typescript ([@dbushong](https://github.com/dbushong))
61 |
62 |
63 | ### v10.0.5 (2021-08-16)
64 |
65 | #### 🔼 Dependencies
66 |
67 | * [#53](https://github.com/groupon/javascript/pull/53) chore(deps): bump path-parse from 1.0.6 to 1.0.7 ([@dependabot[bot]](https://github.com/apps/dependabot))
68 |
69 |
70 | ### v10.0.4 (2021-06-04)
71 |
72 | #### 🔼 Dependencies
73 |
74 | * [#51](https://github.com/groupon/javascript/pull/51) chore(deps): bump hosted-git-info from 2.5.0 to 2.8.9 ([@dependabot[bot]](https://github.com/apps/dependabot))
75 |
76 | #### 🏡 Internal
77 |
78 | * [#52](https://github.com/groupon/javascript/pull/52) ci(actions): add GitHub actions ([@aaarichter](https://github.com/aaarichter))
79 |
80 |
81 | ### v10.0.3 (2021-03-26)
82 |
83 | #### 🏡 Internal
84 |
85 | * [#50](https://github.com/groupon/javascript/pull/50) chore: switch to main & update packages ([@aaarichter](https://github.com/aaarichter))
86 |
87 |
88 | ### 10.0.2 - 2021-02-17
89 |
90 | * chore(deps): bump ini from 1.3.5 to 1.3.8 - **[@dependabot[bot]](https://github.com/apps/dependabot)** [#49](https://github.com/groupon/javascript/pull/49)
91 | - [`4faeca0`](https://github.com/groupon/javascript/commit/4faeca071921515f753329189d42d0e68fbad1b2) **chore:** bump ini from 1.3.5 to 1.3.8 - see: [v1](- [Commits](https://github.com/isaacs/ini/compare/v1)
92 |
93 |
94 | ### 10.0.1 - 2020-07-20
95 |
96 | * chore(deps): bump lodash from 4.17.15 to 4.17.19 - **[@dependabot[bot]](https://github.com/apps/dependabot)** [#46](https://github.com/groupon/javascript/pull/46)
97 | - [`a5bcdf0`](https://github.com/groupon/javascript/commit/a5bcdf0d16044ec30b60e8dd882ffde5b038024c) **chore:** bump lodash from 4.17.15 to 4.17.19 - see: [4](- [Commits](https://github.com/lodash/lodash/compare/4)
98 |
99 |
100 | ### 10.0.0 - 2020-05-12
101 |
102 | #### Breaking Changes
103 |
104 | - Upgrade to Eslint 7.x requires Node 10.12 or higher. See [eslint 7.x migration guide](https://eslint.org/docs/user-guide/migrating-to-7.0.0)
105 | - Drop Node 8 support
106 |
107 | *See: [`f4373ab`](https://github.com/groupon/javascript/commit/f4373ab016a3a153f70b5e8811f89ba3c8795d21)*
108 |
109 | #### Commits
110 |
111 | * refactor: upgrade to eslint 7.x & drop Node 8 support - **[@aaarichter](https://github.com/aaarichter)** [#45](https://github.com/groupon/javascript/pull/45)
112 | - [`f4373ab`](https://github.com/groupon/javascript/commit/f4373ab016a3a153f70b5e8811f89ba3c8795d21) **refactor:** upgrade to Eslint 7.x & drop Node 8 support
113 | - [`7f3cbde`](https://github.com/groupon/javascript/commit/7f3cbde1da113acc0230252771236f5cfe1700e9) **refactor:** use assert instead of assertive
114 |
115 |
116 | ### 9.0.0
117 |
118 | #### Breaking Changes
119 |
120 | requires prettier 2.x peerDep and will result in a
121 | lot of style changes around chained method invocations
122 |
123 | *See: [`6c004e6`](https://github.com/groupon/javascript/commit/6c004e6f51c2933e919448006e5c227f04adffdb)*
124 |
125 | #### Commits
126 |
127 | * upgrade to prettier2 - **[@dbushong](https://github.com/dbushong)** [#44](https://github.com/groupon/javascript/pull/44)
128 | - [`6c004e6`](https://github.com/groupon/javascript/commit/6c004e6f51c2933e919448006e5c227f04adffdb) **feat:** upgrade to prettier2 - see: [2](See: https://prettier.io/blog/2020/03/21/2)
129 |
130 |
131 | ### 8.1.1
132 |
133 | * chore(deps): bump acorn from 7.1.0 to 7.1.1 - **[@dependabot[bot]](https://github.com/apps/dependabot)** [#43](https://github.com/groupon/javascript/pull/43)
134 | - [`289dab3`](https://github.com/groupon/javascript/commit/289dab330579637cfc0fe2144b1f39bf348a84f7) **chore:** bump acorn from 7.1.0 to 7.1.1 - see: [7](- [Commits](https://github.com/acornjs/acorn/compare/7)
135 |
136 |
137 | ### 8.1.0
138 |
139 | * feat: update rules & packages - **[@aaarichter](https://github.com/aaarichter)** [#42](https://github.com/groupon/javascript/pull/42)
140 | - [`44bdfaf`](https://github.com/groupon/javascript/commit/44bdfaf6920e8a82996948657b6d717ceda8a942) **chore:** update / upgrade packages
141 | - [`af4f8c3`](https://github.com/groupon/javascript/commit/af4f8c3d8a723fd49f787923ba690642df408e6d) **feat:** add no-self-assign rule
142 | - [`c896339`](https://github.com/groupon/javascript/commit/c8963396a0ac29c13e2dffe37cd1c2018df73fd8) **fix:** set 8.5.0 as min required node version & adjust example
143 |
144 |
145 | ### 8.0.1
146 |
147 | * turn off node shebang test - **[@dbushong](https://github.com/dbushong)** [#41](https://github.com/groupon/javascript/pull/41)
148 | - [`bacf7ca`](https://github.com/groupon/javascript/commit/bacf7caf3c1d9047692a877075efb671dd80c84b) **fix:** turn off node shebang test
149 |
150 |
151 | ### 8.0.0
152 |
153 | #### Breaking Changes
154 |
155 | /nodeN entrypoints are gone; you must specify a
156 | `engines.node` section in your `package.json`; new defaults as specified
157 | by adding `extends: plugin:node/recommended`; dropped support for node 6
158 | and node 4 and es5
159 |
160 | *See: [`a207b40`](https://github.com/groupon/javascript/commit/a207b40a5e5cab1ee74fe7d6dd343aed7773265d)*
161 |
162 | #### Commits
163 |
164 | * Complete refactor + Node 12.x (and beyond) support - **[@dbushong](https://github.com/dbushong)** [#40](https://github.com/groupon/javascript/pull/40)
165 | - [`20ce479`](https://github.com/groupon/javascript/commit/20ce4791f61d380a4011887b6ccdf70d8a53c454) **chore:** update the peerDeps
166 | - [`02a5a35`](https://github.com/groupon/javascript/commit/02a5a35f5aa10aad704d55800a73bab0d498e357) **chore:** check in package-lock
167 | - [`16297a4`](https://github.com/groupon/javascript/commit/16297a4b40d2196a50b764aaaae26878afae1049) **chore:** upgrade pkgs & builds
168 | - [`a207b40`](https://github.com/groupon/javascript/commit/a207b40a5e5cab1ee74fe7d6dd343aed7773265d) **feat:** support all versions automatically
169 | - [`6d3fd0f`](https://github.com/groupon/javascript/commit/6d3fd0f3161a18d7c53a8513b5a960f6bf20bea5) **fix:** tweak default node/* settings
170 | - [`55315c9`](https://github.com/groupon/javascript/commit/55315c94c343ca253245145ab3322663e0de6715) **test:** add negative test for node supported
171 |
172 |
173 | ### 7.2.1
174 |
175 | * make peerDependencies looser - **[@dbushong](https://github.com/dbushong)** [#39](https://github.com/groupon/javascript/pull/39)
176 | - [`9e61ef3`](https://github.com/groupon/javascript/commit/9e61ef344224a82a0af43c9eeb62769e584ce303) **fix:** make peerDependencies looser
177 |
178 |
179 | ### 7.2.0
180 |
181 | * add support for groupon/node10 - **[@dbushong](https://github.com/dbushong)** [#36](https://github.com/groupon/javascript/pull/36)
182 | - [`3be91a5`](https://github.com/groupon/javascript/commit/3be91a544b54dfd22cb549f11347695378bf3269) **feat:** add support for groupon/node10
183 |
184 |
185 | ### 7.1.0
186 |
187 | * add object-shorthand as fixable error - **[@dbushong](https://github.com/dbushong)** [#35](https://github.com/groupon/javascript/pull/35)
188 | - [`e7a0496`](https://github.com/groupon/javascript/commit/e7a04967fc6f4b906f5de0a93db62d39e22c65b8) **feat:** add object-shorthand as fixable error
189 |
190 |
191 | ### 7.0.0
192 |
193 | #### Breaking Changes
194 |
195 | This config now builds on top of ESLint 5. This
196 | also affects other `peerDependencies` like certain plugins.
197 |
198 | *See: [`986105d`](https://github.com/groupon/javascript/commit/986105d0ca9595d9d79c8b717999481eb6fd4478)*
199 |
200 | #### Commits
201 |
202 | * Upgrade to ESLint 5 - **[@jkrems](https://github.com/jkrems)** [#32](https://github.com/groupon/javascript/pull/32)
203 | - [`986105d`](https://github.com/groupon/javascript/commit/986105d0ca9595d9d79c8b717999481eb6fd4478) **refactor:** Upgrade to ESLint 5
204 |
205 |
206 | ### 6.1.1
207 |
208 | * consistent-return: allow implicit undefined - **[@dbushong](https://github.com/dbushong)** [#31](https://github.com/groupon/javascript/pull/31)
209 | - [`21b9ac3`](https://github.com/groupon/javascript/commit/21b9ac3ce66d9678d71874ef89899689ae100a2a) **fix:** consistent-return: allow implicit undefined
210 |
211 |
212 | ### 6.1.0
213 |
214 | * add rule `consistent-return` - **[@dbushong](https://github.com/dbushong)** [#30](https://github.com/groupon/javascript/pull/30)
215 | - [`cea8c21`](https://github.com/groupon/javascript/commit/cea8c212eee48a5683a5fe532a6e8247714f531b) **feat:** add rule `consistent-return`
216 |
217 |
218 | ### 6.0.0
219 |
220 | #### Breaking Changes
221 |
222 | adds eslint-plugin-mocha as a peerDep
223 |
224 | *See: [`897dbb0`](https://github.com/groupon/javascript/commit/897dbb015345977c40dcb5a8a5a6437a8627f51b)*
225 |
226 | #### Commits
227 |
228 | * add mocha lint checks - **[@dbushong](https://github.com/dbushong)** [#29](https://github.com/groupon/javascript/pull/29)
229 | - [`897dbb0`](https://github.com/groupon/javascript/commit/897dbb015345977c40dcb5a8a5a6437a8627f51b) **feat:** add mocha lint checks
230 |
231 |
232 | ### 5.4.2
233 |
234 | * docs: update file naming and organization - Closes #7 - **[@markowsiak](https://github.com/markowsiak)** [#28](https://github.com/groupon/javascript/pull/28)
235 | - [`6593962`](https://github.com/groupon/javascript/commit/65939628e36ffe7c6896bb6febe2e8d3eb890719) **docs:** update filenaming and organization - Closes #7 - see: [#7](https://github.com/groupon/javascript/issues/7)
236 |
237 |
238 | ### 5.4.1
239 |
240 | * Do not prefer arrow for ES5 - **[@jkrems](https://github.com/jkrems)** [#27](https://github.com/groupon/javascript/pull/27)
241 | - [`380f1ae`](https://github.com/groupon/javascript/commit/380f1ae7729b9e8c519fb2315f17b0004fedc87a) **fix:** Do not prefer arrow for ES5
242 |
243 |
244 | ### 5.4.0
245 |
246 | * resurrect prefer-arrow-callback - **[@dbushong](https://github.com/dbushong)** [#26](https://github.com/groupon/javascript/pull/26)
247 | - [`7de330c`](https://github.com/groupon/javascript/commit/7de330cb724553d9686426e99786f0bf5f1fcccb) **feat:** resurrect prefer-arrow-callback
248 |
249 |
250 | ### 5.3.0
251 |
252 | * apply === rule with null expection - **[@dbushong](https://github.com/dbushong)** [#25](https://github.com/groupon/javascript/pull/25)
253 | - [`c727390`](https://github.com/groupon/javascript/commit/c72739026db07af40b79849a1f80ef7082984f3c) **feat:** apply === rule with null expection
254 |
255 |
256 | ### 5.2.1
257 |
258 | * Apply latest nlm generator - **[@markowsiak](https://github.com/markowsiak)** [#24](https://github.com/groupon/javascript/pull/24)
259 | - [`c6a3316`](https://github.com/groupon/javascript/commit/c6a3316472d23ce6ca801c09ef4a4230dd496c07) **chore:** apply latest generator
260 |
261 |
262 | ### 5.2.0
263 |
264 | * resurrect `no-console` as `error` - **[@dbushong](https://github.com/dbushong)** [#23](https://github.com/groupon/javascript/pull/23)
265 | - [`f66914e`](https://github.com/groupon/javascript/commit/f66914e8b3770d6c2538cb2af1a41cf19ee1b22c) **feat:** resurrect `no-console` as `error`
266 | - [`57a5ff9`](https://github.com/groupon/javascript/commit/57a5ff94e63fe99e8d60174228779d583eace481) **chore:** add nvmrc for node8 dev compliance
267 |
268 |
269 | ### 5.1.1
270 |
271 | * fix: set prefer-template to off for es5 - **[@markowsiak](https://github.com/markowsiak)** [#22](https://github.com/groupon/javascript/pull/22)
272 | - [`fb601e6`](https://github.com/groupon/javascript/commit/fb601e612117e262695386ab40f0cc63a15aaac1) **fix:** set prefer-template to off for es5
273 |
274 |
275 | ### 5.1.0
276 |
277 | * feat: support object spread and mjs - **[@jkrems](https://github.com/jkrems)** [#21](https://github.com/groupon/javascript/pull/21)
278 | - [`344fe64`](https://github.com/groupon/javascript/commit/344fe6447c9b284d7d6edb7e088d98ae59342e33) **feat:** support object spread and mjs
279 |
280 |
281 | ### 5.0.0
282 |
283 | #### Breaking Changes
284 |
285 | This switches our linting to an entirely new
286 | set of rules. For the most part we're trying to stay consistent
287 | with the old format to reduce churn but it explicitly is a departure.
288 |
289 | *See: [`559c99f`](https://github.com/groupon/javascript/commit/559c99f6d3c153ca13d78aaed164a7a73e3c48e7)*
290 |
291 | #### Commits
292 |
293 | * Simplify package structure and decouple from Airbnb - **[@jkrems](https://github.com/jkrems)** [#20](https://github.com/groupon/javascript/pull/20)
294 | - [`559c99f`](https://github.com/groupon/javascript/commit/559c99f6d3c153ca13d78aaed164a7a73e3c48e7) **refactor:** Drop dependency on lerna & airbnb
295 | - [`98ce778`](https://github.com/groupon/javascript/commit/98ce778b0ded4438f10461f4b7d519e55a8c8eba) **feat:** Add prettier for node 6 config
296 | - [`15b1ec6`](https://github.com/groupon/javascript/commit/15b1ec6ec3b386fe399c3287e3cac61d4d3209f9) **feat:** Bring back basic bug prevention rules
297 | - [`5c3d500`](https://github.com/groupon/javascript/commit/5c3d500b33717beb0f2decbbbd7c321786d4c6dc) **fix:** Use proper import syntax
298 | - [`f849bdc`](https://github.com/groupon/javascript/commit/f849bdcee338a835f2b5006c203144be53cd4b7d) **feat:** Add import checks
299 | - [`366813b`](https://github.com/groupon/javascript/commit/366813bc72b71b9fe3a2bb12f83f766921e80f3a) **fix:** Add missing test file pattern
300 | - [`94d539c`](https://github.com/groupon/javascript/commit/94d539c48aad5de230301e5489e31cc18566f526) **refactor:** Run tests on node 8
301 | - [`f898741`](https://github.com/groupon/javascript/commit/f898741f09ef28f74c5b862334feb1118dcefa6f) **refactor:** Reuse rule list
302 | - [`1396cb1`](https://github.com/groupon/javascript/commit/1396cb18d1d2a08fa35bb0d57742d4b999fedaaf) **test:** Verify ES5 vs. ES6 behavior
303 | - [`5eff6a0`](https://github.com/groupon/javascript/commit/5eff6a053f1c9b032a2808d30b40b3da422dd172) **test:** Enable coffee tests
304 | - [`ef674e4`](https://github.com/groupon/javascript/commit/ef674e431544a0ef247c3a8f1315de2af5c617b3) **feat:** Bring back style linting
305 | - [`c42aeb7`](https://github.com/groupon/javascript/commit/c42aeb7213795f96ea9de14cc1d06a061c57d35d) **fix:** Add more --fix test cases
306 | - [`f4d8eb6`](https://github.com/groupon/javascript/commit/f4d8eb69593c8c94a6bf6a2bd78a7f1801a4452d) **test:** Add test case of newline after import
307 | - [`f9cdaaf`](https://github.com/groupon/javascript/commit/f9cdaafa737eee65a9743b40bdc1dfd4f5859ab4) **docs:** Add links to opinion rules
308 | - [`ff1ddca`](https://github.com/groupon/javascript/commit/ff1ddca281790b84cd2822cb057ad3635e5b1087) **fix:** Remove console.log
309 | - [`38d19d3`](https://github.com/groupon/javascript/commit/38d19d3998353cef2248c3c611647baee40114f8) **style:** Self-lint with latest deps
310 | - [`6dc9135`](https://github.com/groupon/javascript/commit/6dc9135e1d5ef3f7280a056bc22f2ed956ef27b6) **fix:** Lint self for node 4
311 | - [`74df77c`](https://github.com/groupon/javascript/commit/74df77c63147ea18754c7b8f41ed3ff9877326de) **docs:** Update readme with updated overview
312 | - [`decdae0`](https://github.com/groupon/javascript/commit/decdae0c02340c8f6a03cd3be918595d0629ed27) **docs:** Elaborate on rule categories
313 | - [`b8c7123`](https://github.com/groupon/javascript/commit/b8c71238e8722d1f72147f8b9f92084ce36da272) **chore:** Include stylint config in package
314 | - [`7951d90`](https://github.com/groupon/javascript/commit/7951d90b874f18fc9edbd988a8ee17dba66ff12b) **feat:** Port more airbnb rules
315 | - [`7041f12`](https://github.com/groupon/javascript/commit/7041f121035b67d6b15c9d38c1ab83d3776da745) **feat:** Cover more variable conventions
316 | - [`3a93a0c`](https://github.com/groupon/javascript/commit/3a93a0c0b249c12263513fcc6632b87ee127abad) **chore:** Add nlm & license headers
317 | - [`3a9e573`](https://github.com/groupon/javascript/commit/3a9e5735f302a581a8d1bbdfc8f576c6d68ff1e0) **chore:** Ignore package-lock.json since it's not stable
318 | - [`2952567`](https://github.com/groupon/javascript/commit/2952567090982a54af18f95646ea3c22cc98b9ed) **chore:** Rename and clean up dependencies
319 | - [`64630f8`](https://github.com/groupon/javascript/commit/64630f802ff3a0da665c065460d3b91b4a1af0be) **refactor:** Back out coffee & stylus linting
320 | - [`4d86376`](https://github.com/groupon/javascript/commit/4d863762efc21e3e843cd29de0afb3875a9b20ff) **chore:** Apply latest generator
321 | - [`4270b97`](https://github.com/groupon/javascript/commit/4270b97bd791cc8c6a09e27c8264256b1d80866f) **docs:** Clarify our lack of compliance with airbnb
322 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Contributing
4 |
5 | 🎉🏅 Thanks for helping us improve this project! 🙏
6 |
7 | This document outlines some practices we care about.
8 | If you have any questions or suggestions about the process,
9 | feel free to [open an issue](#reporting-issues)
10 | .
11 |
12 | ## How Can I Contribute?
13 |
14 | ### Reporting Issues
15 |
16 | If you find any mistakes in the docs or a bug in the code,
17 | please [open an issue in Github](https://github.com/groupon/javascript/issues/new) so we can look into it.
18 | You can also [create a PR](#contributing-code) fixing it yourself, or course.
19 |
20 | If you report a bug, please follow these guidelines:
21 |
22 | * Make sure the bug exists in the latest version.
23 | * Include instructions on how to reproduce the issue.
24 | The instructions should be as minimal as possible
25 | and answer the three big questions:
26 | 1. What are the exact steps you took? This includes the exact versions of
27 | node, npm, and any packages involved.
28 | 1. What result are you expecting?
29 | 1. What is the actual result?
30 |
31 | ### Improving Documentation
32 |
33 | For small documentation changes, you can use [Github's editing feature][ghedit].
34 | The only thing to keep in mind is to prefix the commit message with "docs: ".
35 | The default commit message generated by Github will lead to a failing CI build.
36 |
37 | [ghedit]: https://help.github.com/articles/editing-files-in-another-user-s-repository/
38 |
39 | For larger updates to the documentation
40 | it might be better to follow the
41 | [instructions for contributing code below](#contributing-code).
42 |
43 | ### Contributing Code
44 |
45 | **Note:** If you're planning on making substantial changes,
46 | please [open an issue first to discuss your idea](#reporting-issues).
47 | Otherwise, you might end up investing a lot of work
48 | only to discover that it conflicts with plans the maintainers might have.
49 |
50 | The general steps for creating a pull request are:
51 |
52 | 1. Create a branch for your change. Always start your branch from the latest
53 | `main`. We recommend using `git wf start some-feature-name` by using
54 | [git workflow][gitwf]. Run `npm install` to install the dependencies.
55 | 1. If you're fixing a bug, be sure to write a test *first*. That way you can
56 | validate that the test actually catches the bug and doesn't pass.
57 | 1. Make your changes to the code. Remember to update the tests if you add new
58 | features or change behavior.
59 | 1. Run the tests via `npm test`. This will also run style checks and other
60 | validations. You might see errors about uncommitted files. This is
61 | expected until you commit your changes.
62 | 1. Once you're done, `git add .` and `git commit`. Please follow the
63 | [commit message conventions](#commits--commit-messages) described below.
64 | 1. Push your branch to Github & create a PR.
65 |
66 | [gitwf]: https://github.com/groupon/git-workflow
67 |
68 | #### Code Style
69 |
70 | In addition to any linting rules the project might include, a few general rules
71 | of thumb:
72 |
73 | * Try to match the style of the rest of the code.
74 | * We prefer simple code that is easy to understand over terse, expressive code.
75 | * We try to structure projects by semantics instead of role. E.g. we'd rather
76 | have a `tree.js` module that contains tree traversal-related helpers than
77 | a `helpers.js` module.
78 | * Actually, if you create helpers you might want to put those into a separate
79 | package. That way it's easier to reuse them.
80 |
81 | #### Commits & Commit Messages
82 |
83 | Please follow the [angular commit message conventions][angular-commits]. We
84 | use an automated tool for generating releases that depends on the conventions
85 | to determine the next version and the content of the changelog. Commit messages
86 | that don't follow the conventions will cause `npm test` (and thus CI) to fail.
87 |
88 | The short summary - a commit message should look like this:
89 |
90 | ```
91 | :
92 |
93 |
94 |
95 |
96 |
97 |