Skip to content

Commit

Permalink
updates dependencies
Browse files Browse the repository at this point in the history
adds readme
  • Loading branch information
frabarz committed Apr 3, 2021
1 parent 835b9bf commit 2967f16
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 17 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# @datawheel/eslint-config

A set of common eslint rules to use on Datawheel javascript projects.

## Usage

You will need to install this package's `peerDependencies` for it to work correctly.
To install both this package and its `peerDependencies` at once, you can use this command:

```bash
npx install-peerdeps --dev @datawheel/eslint-config
```

Check the documentation for the [`install-peerdeps` package](https://www.npmjs.com/package/install-peerdeps) for more options.

To enable this config file, add `"extends": "@datawheel"` to your [eslint config file](https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-file-formats).
The easiest way is to set it under the `"eslintConfig"` key in the `package.json` file of your project.
32 changes: 17 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
node: true
},
extends: ["plugin:react/recommended"],
parser: "babel-eslint",
parser: "@babel/eslint-parser",
parserOptions: {
sourceType: "module",
ecmaFeatures: {
Expand All @@ -25,7 +25,9 @@ module.exports = {
"block-scoped-var": 2,
"block-spacing": 2,
"brace-style": [2, "stroustrup"],
"camelcase": [2, { "properties": "never" }],
"camelcase": [2, {
"properties": "never"
}],
"comma-dangle": 2,
"comma-spacing": 2,
"comma-style": 2,
Expand All @@ -40,30 +42,30 @@ module.exports = {
"dot-notation": 2,
"eol-last": 2,
"eqeqeq": [2, "smart"],
"func-style": [2, "declaration", { "allowArrowFunctions": true }],
"func-style": [2, "declaration", {
"allowArrowFunctions": true
}],
"generator-star-spacing": 2,
"global-require": 0,
"guard-for-in": 2,
"handle-callback-err": 2,
"id-match": 2,
"indent": [
2,
2,
{
"SwitchCase": 1,
"VariableDeclarator": {
"var": 2,
"let": 2,
"const": 3
}
"indent": [2, 2, {
"SwitchCase": 1,
"VariableDeclarator": {
"var": 2,
"let": 2,
"const": 3
}
],
}],
"jsx-quotes": 2,
"key-spacing": 2,
"keyword-spacing": 2,
"lines-around-comment": 2,
"max-nested-callbacks": 2,
"new-cap": [2, { "capIsNewExceptions": ["Radium"] }],
"new-cap": [2, {
"capIsNewExceptions": ["Radium"]
}],
"new-parens": 2,
"no-cond-assign": 2,
"no-constant-condition": 2,
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@datawheel/eslint-config",
"version": "1.0.2",
"description": "A common set of eslint rules for the company.",
"main": "index.js",
"main": "./index.js",
"readme": "./README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/Datawheel/eslint-config.git"
Expand All @@ -20,8 +21,8 @@
},
"homepage": "https://github.com/Datawheel/eslint-config#readme",
"peerDependencies": {
"@babel/eslint-parser": ">= 6",
"eslint": ">= 3",
"babel-eslint": ">= 6",
"eslint-plugin-react": ">= 7"
}
}

0 comments on commit 2967f16

Please sign in to comment.