testlint
A helping hand in releasing reliable world-class ESLint plugins & presets
Usage with Tape
Add this to your dependencies block of package.json:
"eslint": "^4.2.0",
"tape": "^4.6.3",
"tap-difflet": "0.7.0",
Run npm i testlint
Create your own lint test function with testlint
like so:
const createTestLint = const reactSpecificESLintConfig = plugins: 'react' parserOptions: ecmaFeatures: jsx: true const baseESLintConfig = useEslintrc: false // Point to the ESLint config you're building & testing here configFile: 'eslintrc.json' const cliEngineOptionsCreator = baseESLintConfig withReactSupport ? reactSpecificESLintConfig : moduleexports =
Using your ESLint preset/config tester in your /test folder like so:
const testLint =
Then run:
node --harmony ./node_modules/.bin/tape test/*.js | tap-difflet