Skip to content

Commit

Permalink
- Enhancement: Add "recommended" config which auto-adds plugins and…
Browse files Browse the repository at this point in the history
… all current rules (one as a warning)

- Linting: Rename eslintrc to include recommended extension
- git/npm: Add package-lock.json to ignored files
- npm: Add recommended package.json fields (contributors, dependencies)
- npm: Add `peerDependencies` as called for by ESLint
- Travis: Add Node 12/ESLint 6 and Node 10/ESLint 5 tests
  • Loading branch information
brettz9 committed Oct 24, 2019
1 parent 8681162 commit a711e9a
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 5 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ build/Release
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules

# Lock files
package-lock.json
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/tests/
/.editorconfig
/.eslintignore
/.eslintrc
/.eslintrc.json
/.gitignore
/.npmignore
/.travis.yml
/yarn.lock
/package-lock.json
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js: 10
node_js: 12

branches:
except:
Expand Down Expand Up @@ -32,8 +32,16 @@ jobs:
env: ESLINT_VERSION=3

- <<: *test
node_js: 10
env: ESLINT_VERSION=4

- <<: *test
node_js: 10
env: ESLINT_VERSION=5

- <<: *test
env: ESLINT_VERSION=6

deploy:
provider: npm
email: tobias.bieniek@gmx.de
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

[![Build Status](https://img.shields.io/travis/Turbo87/eslint-plugin-chai-expect/master.svg)](https://travis-ci.org/Turbo87/eslint-plugin-chai-expect)

ESLint plugin that checks for common chai.js expect() mistakes
ESLint plugin that checks for common chai.js `expect()` mistakes


## Requirements

- Node.js 6 or above
- ESLint 4.x or 5.x
- ESLint 4.x or 5.x or 6.x


## Installation
Expand Down Expand Up @@ -53,7 +53,7 @@ Enable the rules that you would like to use:

#### terminating-properties rule

A number of extenstions to chai add additional terminating properties. For example [chai-http](https://github.com/chaijs/chai-http) adds:
A number of extensions to chai add additional terminating properties. For example [chai-http](https://github.com/chaijs/chai-http) adds:

- headers
- html
Expand Down
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
'use strict';

module.exports = {
configs: {
recommended: {
plugins: ['chai-expect'],
rules: {
'chai-expect/no-inner-compare': 'warning',
'chai-expect/missing-assertion': 'error',
'chai-expect/terminating-properties': 'error'
}
}
},
rules: {
'no-inner-compare': require('./lib/rules/no-inner-compare'),
'missing-assertion': require('./lib/rules/missing-assertion'),
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"bugs": "https://github.com/turbo87/eslint-plugin-chai-expect/issues",
"license": "MIT",
"author": "Tobias Bieniek <tobias.bieniek@gmail.com>",
"contributors": [
"Brett Zamir"
],
"files": [
"LICENSE",
"README.md",
Expand All @@ -28,6 +31,10 @@
"test": "npm run lint && npm run unit-test",
"unit-test": "mocha tests/**/*.js"
},
"peerDependencies": {
"eslint": ">=2.0.0"
},
"dependencies": {},
"devDependencies": {
"chai": "^4.2.0",
"eslint": "5.16.0",
Expand Down

0 comments on commit a711e9a

Please sign in to comment.