Skip to content

Commit

Permalink
adds style and script linter packages (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
delambo authored and ccpricenytimes committed Dec 11, 2016
1 parent 6644ca4 commit aab1e7d
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 48 deletions.
34 changes: 34 additions & 0 deletions packages/eslint-config-kyt/eslintrc.json
Original file line number Diff line number Diff line change
@@ -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
}
}
27 changes: 27 additions & 0 deletions packages/eslint-config-kyt/package.json
Original file line number Diff line number Diff line change
@@ -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"]
}
2 changes: 1 addition & 1 deletion packages/kyt-cli/config/user/.eslintrc.base.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"./node_modules/kyt/config/.eslintrc.base.json"
"eslint-config-kyt"
],

"env": {
Expand Down
3 changes: 2 additions & 1 deletion packages/kyt-cli/config/user/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "./node_modules/kyt/config/.stylelintrc.base.json",
"extends": "stylelint-config-kyt",

"rules": {
}
}
34 changes: 2 additions & 32 deletions packages/kyt-core/config/.eslintrc.base.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
5 changes: 1 addition & 4 deletions packages/kyt-core/config/.stylelintrc.base.json
Original file line number Diff line number Diff line change
@@ -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"]}]
}
}
13 changes: 3 additions & 10 deletions packages/kyt-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"engines": {
"node": ">=6.1.0"
},
"scripts": {
},
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/nytimes/kyt.git"
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
23 changes: 23 additions & 0 deletions packages/stylelint-config-kyt/package.json
Original file line number Diff line number Diff line change
@@ -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"]
}
9 changes: 9 additions & 0 deletions packages/stylelint-config-kyt/stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "stylelint-config-standard",

"rules": {
"string-quotes": "single",
"selector-no-id": true,
"property-no-unknown": [true, {ignoreProperties: ["composes"]}]
}
}

0 comments on commit aab1e7d

Please sign in to comment.