diff --git a/packages/eslint-config-kaplankomputing/.eslintrc b/packages/eslint-config-kaplankomputing/.eslintrc new file mode 100644 index 0000000000..d811f404b4 --- /dev/null +++ b/packages/eslint-config-kaplankomputing/.eslintrc @@ -0,0 +1,3 @@ +{ + "extends": "./index.js" +} diff --git a/packages/eslint-config-kaplankomputing/README.md b/packages/eslint-config-kaplankomputing/README.md new file mode 100644 index 0000000000..b71361c3ca --- /dev/null +++ b/packages/eslint-config-kaplankomputing/README.md @@ -0,0 +1,17 @@ +# eslint-config-kaplankomputing + +Kaplan Komputing's eslint configuration + +## Getting Started + +``` +npm install --save-dev eslint-config-kaplankomputing +``` + +In your project, add an `.eslintrc` file to your project. + +``` +{ + "extends": "kaplankomputing" +} +``` diff --git a/packages/eslint-config-kaplankomputing/index.js b/packages/eslint-config-kaplankomputing/index.js new file mode 100644 index 0000000000..800361e869 --- /dev/null +++ b/packages/eslint-config-kaplankomputing/index.js @@ -0,0 +1,42 @@ +module.exports = { + env: { + es6: true, + }, + extends: 'airbnb', + rules: { + 'no-use-before-define': ['error', { functions: false, classes: false }], + 'no-param-reassign': ['error', { props: false }], + 'func-names': ['error', 'never'], + 'space-before-function-paren': ['error', { + named: 'never', + anonymous: 'never', + }], + 'arrow-parens': ['error', 'as-needed'], + 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], + 'consistent-return': 0, + 'arrow-body-style': ['error', 'always'], + 'no-unused-expressions': 0, + indent: 0, + 'no-underscore-dangle': 0, + 'require-jsdoc': ['error', { + require: { + FunctionDeclaration: true, + MethodDefinition: true, + ClassDeclaration: false, + ArrowFunctionExpression: false, + }, + }], + }, + globals: { + angular: true, + ionic: true, + store: true, + moment: true, + window: true, + PushNotification: true, + analytics: true, + io: true, + document: true, + }, + parser: 'babel-eslint' +}; diff --git a/packages/eslint-config-kaplankomputing/package.json b/packages/eslint-config-kaplankomputing/package.json new file mode 100644 index 0000000000..a663ea5094 --- /dev/null +++ b/packages/eslint-config-kaplankomputing/package.json @@ -0,0 +1,33 @@ +{ + "name": "eslint-config-kaplankomputing", + "version": "1.0.0", + "description": "Kaplan Komputing's ESLint config", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/kaplankomputing/javascript.git" + }, + "keywords": [ + "eslint", + "kaplankomputing", + "kaplan", + "javascript" + ], + "author": "Max Kaplan", + "license": "MIT", + "bugs": { + "url": "https://github.com/kaplankomputing/javascript/issues" + }, + "homepage": "https://github.com/kaplankomputing/javascript#readme", + "dependencies": { + "babel-eslint": "^7.2.3", + "eslint": "^4.5.0", + "eslint-config-airbnb": "^15.1.0", + "eslint-plugin-import": "^2.7.0", + "eslint-plugin-jsx-a11y": "^5.1.1", + "eslint-plugin-react": "^7.2.1" + } +}