├── .eslintignore ├── .gitignore ├── index.js ├── .travis.yml ├── .eslintrc.js ├── package.json └── README.md /.eslintignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | './.eslintrc', 4 | ].map(require.resolve), 5 | rules: {}, 6 | }; 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | cache: 4 | directories: 5 | - node_modules 6 | notifications: 7 | email: false 8 | node_js: 9 | - '4' 10 | before_install: 11 | - npm i -g npm@^2.0.0 12 | before_script: 13 | - npm prune 14 | after_success: 15 | - npm run semantic-release 16 | branches: 17 | except: 18 | - /^v\d+\.\d+\.\d+$/ 19 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Following AirBnB's lead 3 | "extends": "airbnb", 4 | 5 | "parserOptions": { 6 | "ecmaVersion": 6, 7 | }, 8 | 9 | // And overriding where necessary 10 | "rules": { 11 | // Meteor refers to ids with `_id` 12 | "no-underscore-dangle": 0, 13 | 14 | // Meteor build tool aliases "/" to the project root, which causes the 15 | // resolver to complain 16 | "import/no-unresolved": 0, 17 | 18 | // These configurations reflect our specific workflow with ReactTerminator 19 | "jsx-a11y/img-has-alt": 0, 20 | "react/jsx-first-prop-new-line": 0, 21 | 22 | // Lots of callback constructs shouldn't necessarily have a return value, 23 | // particularly callbacks associated with Meteor.subscribe. 24 | "consistent-return": 0, 25 | 26 | // We prefer to allow alerts/confirms because they function as desired 27 | // across platforms (especially mobile) 28 | "no-alert": 0, 29 | }, 30 | }; 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-poetic", 3 | "description": "Poetic's ESlint config based on Airbnb's", 4 | "main": "index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\"", 7 | "semantic-release": "semantic-release pre && npm publish && semantic-release post" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/poetic/eslint-config-poetic.git" 12 | }, 13 | "keywords": [ 14 | "style", 15 | "airbnb", 16 | "eslint", 17 | "poetic" 18 | ], 19 | "author": "codengamer", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/poetic/eslint-config-poetic/issues" 23 | }, 24 | "homepage": "https://github.com/poetic/eslint-config-poetic#readme", 25 | "dependencies": { 26 | "eslint": "^3.11.1", 27 | "eslint-config-airbnb": "^13.0.0", 28 | "eslint-plugin-import": "^2.2.0", 29 | "eslint-plugin-jsx-a11y": "^2.2.3", 30 | "eslint-plugin-react": "^6.7.1" 31 | }, 32 | "devDependencies": { 33 | "semantic-release": "^4.3.5" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # eslint-config-poetic 2 | 3 | [![travis][travis-image]][travis-url] 4 | [![npm][npm-image]][npm-url] 5 | [![semantic-release][semantic-release-image]][semantic-release-url] 6 | 7 | [travis-image]: https://img.shields.io/travis/poetic/eslint-config-poetic.svg?branch=master 8 | [travis-url]: https://travis-ci.org/poetic/eslint-config-poetic 9 | [npm-image]: https://img.shields.io/npm/v/eslint-config-poetic.svg 10 | [npm-url]: https://npmjs.org/package/eslint-config-poetic 11 | [semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg 12 | [semantic-release-url]: https://github.com/semantic-release/semantic-release 13 | 14 | This linter package is based on [AirBnB's configuration](https://github.com/airbnb/javascript). 15 | 16 | ## Installation 17 | 18 | 1. `npm install --save-dev eslint-config-poetic` 19 | 2. add .eslintrc with the following content: 20 | ``` 21 | { 22 | "extends": "poetic" 23 | } 24 | ``` 25 | 26 | ## Usage 27 | To run `eslint` from the command line, try this from your app root directory: 28 | 29 | `eslint --ext .js,.jsx .` 30 | 31 | ### Vim Integration 32 | Install the Syntastic plugin, then add the following to your .vimrc: 33 | 34 | ``` 35 | let g:syntastic_javascript_checkers=['eslint'] 36 | let g:syntastic_javascript_eslint_args="--ext .js,.jsx" 37 | ``` 38 | 39 | *Be sure to remove any other lines that set `syntastic_javascript_checkers`, 40 | if they exist.* 41 | --------------------------------------------------------------------------------