Skip to content

Commit

Permalink
Merge pull request #7 from 20minutes/fix/tests
Browse files Browse the repository at this point in the history
Add some tests
  • Loading branch information
j0k3r authored Jun 22, 2020
2 parents f1075a5 + 7d60168 commit 7215d06
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 36 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('.')
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package-lock.json
node_modules/*
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
os: linux
dist: xenial
language: node_js

node_js:
- lts/*
# avoid double Travis build when the PR is created on upstream
if: |
type = pull_request OR \
branch = master OR \
tag =~ ^v
cache:
directories:
- node_modules
node_js:
- 10
- 12
- 14

script:
- node -c index.js
- npm run lint

deploy:
- provider: npm
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@ This config depends on [Airbnb config](https://github.com/airbnb/javascript).

Using NPM:
```
npm install --save-dev eslint-config-20minutes
npm install --save-dev eslint eslint-config-airbnb eslint-config-20minutes
```

Using Yarn:
```
yarn add --dev eslint-config-20minutes
yarn add --dev eslint eslint-config-airbnb eslint-config-20minutes
```

Update your `.eslintrc`:

```js
{
"extends": "20minutes"
"extends": "20minutes",
"rules": {
// Additional, per-project rules...
}
}
```
51 changes: 26 additions & 25 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
module.exports = {
"env": {
"es6": true,
"node": true,
"jest": true,
"browser": true,
env: {
es6: true,
node: true,
jest: true,
browser: true,
},
"parser": "babel-eslint",
"extends": "airbnb",
"plugins": [
"babel",
parser: 'babel-eslint',
extends: 'airbnb',
plugins: [
'babel',
'react',
],
"rules": {
"semi": [2, "never"],
"no-console": [1, {
"allow": ["warn", "error"],
rules: {
semi: [2, 'never'],
'no-console': [1, {
allow: ['warn', 'error'],
}],
"curly": [1, "all"],
"no-param-reassign": [1, {
"props": false,
curly: [1, 'all'],
'no-param-reassign': [1, {
props: false,
}],
"import/prefer-default-export": 0,
"no-multiple-empty-lines": [1, { "max": 1, "maxEOF": 1, "maxBOF": 0 }],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": "import", "next": "*" },
{ "blankLine": "never", "prev": "import", "next": "import" },
'import/prefer-default-export': 0,
'no-multiple-empty-lines': [1, { max: 1, maxEOF: 1, maxBOF: 0 }],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: 'import', next: '*' },
{ blankLine: 'never', prev: 'import', next: 'import' },
],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
}
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
},
}
49 changes: 46 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
{
"name": "eslint-config-20minutes",
"version": "1.0.8",
"version": "1.0.9",
"description": "ESLint shareable config for 20 Minutes",
"license": "MIT",
"devDependencies": {
"babel-eslint": "^10.0",
"eslint-plugin-babel": "^5.0",
"eslint": "^5.16.0 || ^6.8.0 || <7.3.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-jsx-a11y": "^6.3.0",
"eslint-plugin-react-hooks": "^1.7.0 || ^2.3.0 || ^3 || ^4",
"eslint-config-airbnb": ">=16.0.0"
},
"peerDependencies": {
"eslint-config-airbnb": ">16.0.0"
}
"eslint-config-airbnb": ">=16.0.0"
},
"repository": "20minutes/eslint-config",
"engines": {
"node": ">=10.13.0"
},
"scripts": {
"test": "node -c index.js",
"lint": "eslint index.js"
},
"files": [
"index.js"
],
"keywords": [
"20minutes",
"code",
"quality",
"style",
"lint",
"linter",
"jscs",
"jshint",
"jslint",
"eslint",
"validate",
"code style",
"strict",
"check",
"checker",
"verify",
"enforce",
"hint"
]
}

0 comments on commit 7215d06

Please sign in to comment.