Skip to content

Commit

Permalink
Merge pull request #13 from namics/develop
Browse files Browse the repository at this point in the history
v4.1.0
  • Loading branch information
smollweide authored Jul 18, 2017
2 parents 0756323 + 2f04f5c commit 5c42fd3
Show file tree
Hide file tree
Showing 350 changed files with 6,247 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
npm-debug.log
node_modules
test
processing
bin
documentation
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {

####
- [configuration with flowtype](./documentation/with-flow.md)
- [configuration with prettier](./documentation/with-prettier.md)

### .eslintignore
```
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
USAGE
run `node processing/write-documentation.js`
run `node bin/write-documentation.js`
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
USAGE:
node processing/write-rule-test-files.js rules/flow.js test/flow/rules/
node bin/write-rule-test-files.js rules/flow.js test/flow/rules/
*/

Expand Down
7 changes: 7 additions & 0 deletions configurations/es5-browser-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {

extends: [
'./es5-disable-styles.js',
].map(require.resolve),

};
10 changes: 10 additions & 0 deletions configurations/es5-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {

extends: [
'../rules/best-practices-disable-styles.js',
'../rules/errors-disable-styles.js',
'../rules/style-disable-styles.js',
'../rules/variables-disable-styles.js',
].map(require.resolve),

};
8 changes: 8 additions & 0 deletions configurations/es5-node-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {

extends: [
'./es5-disable-styles.js',
'../rules/node-disable-styles.js',
].map(require.resolve),

};
7 changes: 7 additions & 0 deletions configurations/es6-browser-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {

extends: [
'./es6-disable-styles.js',
].map(require.resolve),

};
12 changes: 12 additions & 0 deletions configurations/es6-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {

extends: [
'../rules/best-practices-disable-styles.js',
'../rules/errors-disable-styles.js',
'../rules/style-disable-styles.js',
'../rules/variables-disable-styles.js',
'../rules/imports-disable-styles.js',
'../rules/es6-disable-styles.js',
].map(require.resolve),

};
8 changes: 8 additions & 0 deletions configurations/es6-node-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {

extends: [
'./es6-disable-styles.js',
'../rules/node-disable-styles.js',
].map(require.resolve),

};
8 changes: 8 additions & 0 deletions configurations/es6-react-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
'extends': [
'./es6-disable-styles.js',
'../rules/react-disable-styles.js',
'../rules/react-a11y-disable-styles.js',
].map(require.resolve),

};
8 changes: 8 additions & 0 deletions configurations/flow-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

module.exports = {

'extends': [
'../rules/flow-disable-styles.js',
].map(require.resolve),

};
2 changes: 1 addition & 1 deletion configurations/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
],
'extends': [
'../rules/flow.js',
],
].map(require.resolve),
'settings': {
'flowtype': {
'onlyFilesWithFlowAnnotation': true,
Expand Down
2 changes: 1 addition & 1 deletion documentation/with-flow.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### with flow
## with flow
Flowtype rules will be accepted if the flow annotation was defined in first line of each file.
```
module.exports = {
Expand Down
33 changes: 33 additions & 0 deletions documentation/with-prettier.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## with prettier

### ES6 + Prettier
```
module.exports = {
"extends": [
"@namics/eslint-config/configurations/es6-browser.js",
"@namics/eslint-config/configurations/es6-browser-disable-styles.js"
]
};
```

### ES6 + React + Prettier
```
module.exports = {
"extends": [
"@namics/eslint-config/configurations/es6-react.js",
"@namics/eslint-config/configurations/es6-react-disable-styles.js"
]
};
```

### ES6 + React + Flow + Prettier
```
module.exports = {
"extends": [
"@namics/eslint-config/configurations/es6-react.js",
"@namics/eslint-config/configurations/es6-react-disable-styles.js",
"@namics/eslint-config/configurations/flow.js",
"@namics/eslint-config/configurations/flow-disable-styles.js"
]
};
```
99 changes: 54 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,57 @@
{
"name": "@namics/eslint-config",
"version": "4.0.0",
"description": "Default configurations for eslint",
"author": "Simon Mollweide <simon.mollweide@namics.com>",
"license": "MIT",
"private": false,
"engines": {
"node": ">=4 <9",
"npm": ">=3 <6"
"name": "@namics/eslint-config",
"version": "4.1.0",
"description": "Default configurations for eslint",
"author": "Simon Mollweide <simon.mollweide@namics.com>",
"license": "MIT",
"private": false,
"engines": {
"node": ">=4 <9",
"npm": ">=3 <6"
},
"repository": {
"type": "git",
"url": "https://github.com/namics/eslint-config-namics.git"
},
"bugs": {
"url": "https://github.com/namics/eslint-config-namics/issues"
},
"main": "configurations/es6-browser.js",
"scripts": {
"lint": "npm run lint:js",
"lint:js": "node_modules/.bin/eslint .",
"test": "npm run lint",
"prettier": "npm run prettier:es5 && npm run prettier:es5node && npm run prettier:es6 && npm run prettier:es6react && npm run prettier:flow",
"prettier:es5": "node_modules/.bin/prettier --write \"test/es5-disable-styles/**/*.js\"",
"prettier:es5node": "node_modules/.bin/prettier --write \"test/es5-node-disable-styles/**/*.js\"",
"prettier:es6": "node_modules/.bin/prettier --write \"test/es6-disable-styles/**/*.js\"",
"prettier:es6react": "node_modules/.bin/prettier --write \"test/es6-react-disable-styles/**/*.js\"",
"prettier:flow": "node_modules/.bin/prettier --write \"test/flow-disable-styles/**/*.js\""
},
"keywords": [
"code checker",
"code linter",
"code standards",
"code style",
"eslint-config",
"eslint",
"eslintconfig",
"lint",
"es2015",
"react",
"jsx"
],
"devDependencies": {
"prettier": "^1.5.3"
},
"repository": {
"type": "git",
"url": "https://github.com/namics/eslint-config-namics.git"
},
"bugs": {
"url": "https://github.com/namics/eslint-config-namics/issues"
},
"main": "configurations/es6-browser.js",
"scripts": {
"lint": "npm run lint:js",
"lint:js": "node_modules/.bin/eslint .",
"test": "npm run lint"
},
"keywords": [
"code checker",
"code linter",
"code standards",
"code style",
"eslint-config",
"eslint",
"eslintconfig",
"lint",
"es2015",
"react",
"jsx"
],
"dependencies": {
"babel-eslint": "7.2.3",
"eslint": "4.2.0",
"eslint-find-rules": "3.1.1",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-react": "7.1.0",
"flow-bin": "0.50.0"
}
"dependencies": {
"babel-eslint": "7.2.3",
"eslint": "4.2.0",
"eslint-find-rules": "3.1.1",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-react": "7.1.0",
"flow-bin": "0.50.0"
}
}
24 changes: 24 additions & 0 deletions rules/best-practices-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* global module */
/* not yet approved by skill group core team */
module.exports = {
rules: {
// specify curly brace conventions for all control statements
'curly': 0,

// enforces consistent newlines before or after dots
'dot-location': 0,

// disallow lexical declarations in case/default clauses
// http://eslint.org/docs/rules/no-case-declarations.html
'no-case-declarations': 0,

// disallow the use of leading or trailing decimal points in numeric literals
'no-floating-decimal': 0,

// disallow use of multiple spaces
'no-multi-spaces': 0,

// disallow use of multiline strings
'no-multi-str': 0,
},
};
17 changes: 17 additions & 0 deletions rules/errors-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* global module */
/* not yet approved by skill group core team */
module.exports = {
rules: {
// require trailing commas in multiline object literals
'comma-dangle': 0,

// disallow unnecessary semicolons
'no-extra-semi': 0,

// disallow irregular whitespace outside of strings and comments
'no-irregular-whitespace': 0,

// Avoid code that looks like two expressions but is actually one
'no-unexpected-multiline': 0,
},
};
32 changes: 32 additions & 0 deletions rules/es6-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* global module */
/* not yet approved by skill group core team */
module.exports = {
rules: {
// enforces no braces where they can be omitted
// http://eslint.org/docs/rules/arrow-body-style
'arrow-body-style': 0,

// require parens in arrow function arguments
'arrow-parens': 0,

// require space before/after arrow function's arrow
// http://eslint.org/docs/rules/arrow-spacing
'arrow-spacing': 0,

// enforce the spacing around the * in generator functions
// http://eslint.org/docs/rules/generator-star-spacing
'generator-star-spacing': 0,

// disallow arrow functions where they could be confused with comparisons
// http://eslint.org/docs/rules/no-confusing-arrow
'no-confusing-arrow': 0,

// enforce usage of spacing in template strings
// http://eslint.org/docs/rules/template-curly-spacing
'template-curly-spacing': 0,

// enforce spacing around the * in yield* expressions
// http://eslint.org/docs/rules/yield-star-spacing
'yield-star-spacing': 0,
},
};
36 changes: 36 additions & 0 deletions rules/flow-disable-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* eslint-disable */
/* global module */
/* not yet approved by skill group core team */
module.exports = {
rules: {


// enforces consistent use of trailing commas in Object and Tuple annotations.
// https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-delimiter-dangle
'flowtype/delimiter-dangle': 0,

// enforces consistent separators between properties in Flow object types.
// https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-object-type-delimiter
'flowtype/object-type-delimiter': 0,

// enforces consistent use of semicolons after type aliases.
// https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-semi
'flowtype/semi': 0,

// enforces consistent spacing after the type annotation colon.
// https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-space-after-type-colon
'flowtype/space-after-type-colon': 0,

// Enforces consistent spacing before the opening < of generic type annotation parameters.
// https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-space-before-generic-bracket
'flowtype/space-before-generic-bracket': 0,

// Enforces consistent spacing before the type annotation colon.
// https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-space-before-type-colon
'flowtype/space-before-type-colon': 0,

// Enforces consistent spacing around union and intersection type separators (| and &).
// https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-union-intersection-spacing
'flowtype/union-intersection-spacing': 0,
},
};
12 changes: 12 additions & 0 deletions rules/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ module.exports = {
// Overwrite require-jsdoc rule
'require-jsdoc': 0,

// disallow importing from the same path more than once
// http://eslint.org/docs/rules/no-duplicate-imports
'no-duplicate-imports': 0,

// disallow duplicate imports
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md
'import/no-duplicates': 0,

// Prevent missing props validation in a React component definition
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
'react/prop-types': 0,

// enforces a particular style for boolean type annotations. This rule takes one argument.
// https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-boolean-style
'flowtype/boolean-style': [2, 'boolean'],
Expand Down
Loading

0 comments on commit 5c42fd3

Please sign in to comment.