diff --git a/packages/eslint-config-kyt/eslintrc.json b/packages/eslint-config-kyt/eslintrc.json new file mode 100644 index 000000000..abcb921ab --- /dev/null +++ b/packages/eslint-config-kyt/eslintrc.json @@ -0,0 +1,34 @@ +{ + "extends": [ + "airbnb" + ], + + "env": { + "jest": true, + "browser": true + }, + + "plugins": [ + "json" + ], + + "globals": { + "KYT": true + }, + + "rules": { + "no-lonely-if": 2, + "no-nested-ternary": 2, + "max-nested-callbacks": [2, { "max": 5 }], + "constructor-super": 2, + "no-this-before-super": 2, + "prefer-spread": 2, + "no-warning-comments": [1, { "terms": ["todo", "fixme"], "location": "start" }], + "react/sort-comp": 0, + "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], + "import/extensions": [1, { "js": "never" }], + "react/require-extension": "off", + "import/no-extraneous-dependencies": [0], + "no-param-reassign": 0 + } +} diff --git a/packages/eslint-config-kyt/package.json b/packages/eslint-config-kyt/package.json new file mode 100644 index 000000000..2107876b2 --- /dev/null +++ b/packages/eslint-config-kyt/package.json @@ -0,0 +1,27 @@ +{ + "name": "eslint-config-kyt", + "version": "0.0.1", + "description": "ESLint configuration for kyt projects.", + "main": "eslintrc.json", + "author": "NYTimes", + "license": "Apache-2.0", + "engines": { + "node": ">=6.1.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nytimes/kyt.git" + }, + "bugs": { + "url": "https://github.com/nytimes/kyt/issues" + }, + "dependencies": { + "eslint": "3.8.1", + "eslint-config-airbnb": "12.0.0", + "eslint-plugin-import": "1.16.0", + "eslint-plugin-json": "1.2.0", + "eslint-plugin-jsx-a11y": "2.2.3", + "eslint-plugin-react": "6.4.1" + }, + "keywords": ["kyt", "eslint", "config", "eslint-config"] +} diff --git a/packages/kyt-cli/config/user/.eslintrc.base.json b/packages/kyt-cli/config/user/.eslintrc.base.json index eebb90374..e2360538d 100644 --- a/packages/kyt-cli/config/user/.eslintrc.base.json +++ b/packages/kyt-cli/config/user/.eslintrc.base.json @@ -1,6 +1,6 @@ { "extends": [ - "./node_modules/kyt/config/.eslintrc.base.json" + "eslint-config-kyt" ], "env": { diff --git a/packages/kyt-cli/config/user/.stylelintrc.json b/packages/kyt-cli/config/user/.stylelintrc.json index fa920f7c3..d343de0bd 100644 --- a/packages/kyt-cli/config/user/.stylelintrc.json +++ b/packages/kyt-cli/config/user/.stylelintrc.json @@ -1,5 +1,6 @@ { - "extends": "./node_modules/kyt/config/.stylelintrc.base.json", + "extends": "stylelint-config-kyt", + "rules": { } } diff --git a/packages/kyt-core/config/.eslintrc.base.json b/packages/kyt-core/config/.eslintrc.base.json index 0d60ab891..03c1371ea 100644 --- a/packages/kyt-core/config/.eslintrc.base.json +++ b/packages/kyt-core/config/.eslintrc.base.json @@ -1,35 +1,5 @@ { "extends": [ - "airbnb" - ], - - "env": { - "jest": true, - "browser": true - }, - - "plugins": [ - "json" - ], - - "globals": { - "KYT": true - }, - - "rules": { - "no-lonely-if": 2, - "no-nested-ternary": 2, - "max-nested-callbacks": [2, { "max": 5 }], - "constructor-super": 2, - "no-this-before-super": 2, - "prefer-spread": 2, - "prefer-reflect": 2, - "no-warning-comments": [1, { "terms": ["todo", "fixme"], "location": "start" }], - "react/sort-comp": 0, - "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], - "import/extensions": [1, { "js": "never" }], - "react/require-extension": "off", - "import/no-extraneous-dependencies": [0], - "no-param-reassign": 0 - } + "eslint-config-kyt" + ] } diff --git a/packages/kyt-core/config/.stylelintrc.base.json b/packages/kyt-core/config/.stylelintrc.base.json index db71a2172..d343de0bd 100644 --- a/packages/kyt-core/config/.stylelintrc.base.json +++ b/packages/kyt-core/config/.stylelintrc.base.json @@ -1,9 +1,6 @@ { - "extends": "stylelint-config-standard", + "extends": "stylelint-config-kyt", "rules": { - "string-quotes": "single", - "selector-no-id": true, - "property-no-unknown": [true, {ignoreProperties: ["composes"]}] } } diff --git a/packages/kyt-core/package.json b/packages/kyt-core/package.json index 1b9735843..5a5eb740e 100644 --- a/packages/kyt-core/package.json +++ b/packages/kyt-core/package.json @@ -9,8 +9,7 @@ "engines": { "node": ">=6.1.0" }, - "scripts": { - }, + "scripts": {}, "repository": { "type": "git", "url": "git+https://github.com/nytimes/kyt.git" @@ -38,12 +37,7 @@ "commander": "2.9.0", "css-loader": "0.25.0", "detect-port": "1.0.1", - "eslint": "3.8.1", - "eslint-config-airbnb": "12.0.0", - "eslint-plugin-import": "1.16.0", - "eslint-plugin-json": "1.2.0", - "eslint-plugin-jsx-a11y": "2.2.3", - "eslint-plugin-react": "6.4.1", + "eslint-config-kyt": "0.0.1", "express": "4.14.0", "extract-text-webpack-plugin": "2.0.0-beta.4", "file-loader": "0.9.0", @@ -65,8 +59,7 @@ "shelljs": "0.7.5", "strip-ansi": "3.0.1", "style-loader": "0.13.1", - "stylelint": "7.5.0", - "stylelint-config-standard": "14.0.0", + "stylelint-config-kyt": "0.0.1", "temp": "0.8.3", "url-loader": "0.5.7", "webpack": "2.1.0-beta.25", diff --git a/packages/stylelint-config-kyt/package.json b/packages/stylelint-config-kyt/package.json new file mode 100644 index 000000000..04b090e61 --- /dev/null +++ b/packages/stylelint-config-kyt/package.json @@ -0,0 +1,23 @@ +{ + "name": "stylelint-config-kyt", + "version": "0.0.1", + "description": "StyleLint configuration for kyt projects.", + "main": "stylelintrc.json", + "author": "NYTimes", + "license": "Apache-2.0", + "engines": { + "node": ">=6.1.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nytimes/kyt.git" + }, + "bugs": { + "url": "https://github.com/nytimes/kyt/issues" + }, + "dependencies": { + "stylelint": "7.5.0", + "stylelint-config-standard": "14.0.0" + }, + "keywords": ["kyt", "stylelint", "config", "stylelint-config"] +} diff --git a/packages/stylelint-config-kyt/stylelintrc.json b/packages/stylelint-config-kyt/stylelintrc.json new file mode 100644 index 000000000..db71a2172 --- /dev/null +++ b/packages/stylelint-config-kyt/stylelintrc.json @@ -0,0 +1,9 @@ +{ + "extends": "stylelint-config-standard", + + "rules": { + "string-quotes": "single", + "selector-no-id": true, + "property-no-unknown": [true, {ignoreProperties: ["composes"]}] + } +}