Skip to content

Commit 2116286

Browse files
authored
Merge pull request #9 from fs-webdev/clifSuggestions
Clif suggestions
2 parents b751f9b + fda8a7e commit 2116286

File tree

7 files changed

+122
-14
lines changed

7 files changed

+122
-14
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ before_install:
66
- echo "//code.lds.org/artifactory/api/npm/npm-fhd/:_authToken=${NPM_PUBLISH_TOKEN}" >> .npmrc
77
- echo "@fs:registry=https://code.lds.org/artifactory/api/npm/npm-fhd/" >> .npmrc
88
deploy:
9-
provider: npm
9+
provider: script
1010
skip_cleanup: true
11-
12-
api_key: "$NPM_PUBLISH_TOKEN"
11+
script: npm run publish
1312
on:
1413
branch: master

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,15 @@ We have an eslint configuration setup for react projects. We HIGHLY recommend yo
88

99
1. Run `npm install @fs/eslint-config-frontier-react --save-dev`
1010
2. Add `"extends": ["@fs/eslint-config-frontier-react"]` to your eslint config.
11+
12+
### Opt in for linting jsdoc rules
13+
14+
We have a configuration for jsdoc rules that you can use if your team decides they want to be more consistent with jsdocs
15+
16+
1. Add a new entry to the `extends` field of your eslint config.
17+
```
18+
"extends": [
19+
"@fs/eslint-config-frontier-react",
20+
"@fs/eslint-config-frontier-react/jsdoc"
21+
],
22+
```

es6.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@ module.exports = {
2424
'arrow-parens': [1, 'as-needed'],
2525
'no-console': 'off',
2626
'no-param-reassign': 'off',
27-
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
27+
'no-plusplus': 'off',
2828
'no-unused-expressions': ['warn', { allowShortCircuit: true }],
29+
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
30+
'no-warning-comments': 1,
2931
'prefer-destructuring': 'off',
30-
'no-plusplus': 'off',
3132

3233
'jest/no-large-snapshots': 'error',
3334

3435
'import/no-extraneous-dependencies': ['error', {devDependencies: ['**/*.stories.js', '**/*.test.js', '**/demo/**']}],
36+
3537
"jsx-a11y/label-has-for": 0, // this is deprecated in future versions so disable now
36-
"jsx-a11y/label-has-associated-control": [ 2, {
37-
"assert": "either", // fs-styles does not support nesting currently
38+
"jsx-a11y/label-has-associated-control": [ 2, { "assert": "either", // fs-styles does not support nesting currently
3839
}],
3940
},
4041
}

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
plugins: ['html'],
2+
plugins: ['html', 'json'],
33
extends: [
44
'@fs/eslint-config-frontier-react/es6',
55
'@fs/eslint-config-frontier-react/react',

jsdoc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
plugins: ['jsdoc'],
3+
rules: {
4+
'jsdoc/check-param-names': 2,
5+
'jsdoc/check-tag-names': 2,
6+
'jsdoc/check-types': 2,
7+
'jsdoc/newline-after-description': 0,
8+
'jsdoc/require-description-complete-sentence': 2,
9+
'jsdoc/require-hyphen-before-param-description': 2,
10+
'jsdoc/require-param': 2,
11+
'jsdoc/require-param-description': 2,
12+
'jsdoc/require-param-type': 2,
13+
'jsdoc/require-returns-description': 2,
14+
'jsdoc/require-returns-type': 2,
15+
},
16+
}

package-lock.json

Lines changed: 80 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "@fs/eslint-config-frontier-react",
3-
"version": "1.4.0",
3+
"version": "2.0.0-alpha.0",
44
"description": "A common ESLint configuration setup for frontier apps",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Warning: no test specified\" && exit 0"
7+
"test": "echo \"Warning: no test specified\" && exit 0",
8+
"publish": "npmPublish"
89
},
910
"repository": {
1011
"type": "git",
@@ -31,6 +32,8 @@
3132
"eslint-plugin-html": "^5.0.3",
3233
"eslint-plugin-import": "^2.16.0",
3334
"eslint-plugin-jest": "22.5.1",
35+
"eslint-plugin-jsdoc": "^8.0.1",
36+
"eslint-plugin-json": "^1.4.0",
3437
"eslint-plugin-jsx-a11y": "^6.1.2",
3538
"eslint-plugin-no-autofix": "0.0.2",
3639
"eslint-plugin-only-warn": "^1.0.1",
@@ -40,6 +43,7 @@
4043
"prettier": "^1.15.3"
4144
},
4245
"devDependencies": {
46+
"@fs/npm-publisher": "^1.0.0",
4347
"eslint": "^5.10.0"
4448
}
4549
}

0 commit comments

Comments
 (0)