Skip to content

Commit

Permalink
fix: enforce editorconfig (fixes #438)
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Nov 24, 2019
1 parent d761d3c commit 70b4fee
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 13 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",
"chai": "^4.2.0",
"eclint": "^2.8.1",
"eslint": "^5.13.0",
"eslint-config-canonical": "^17.3.4",
"gitdown": "^3.1.1",
Expand All @@ -32,7 +33,7 @@
},
"husky": {
"hooks": {
"pre-commit": "npm run check-docs && npm run check-tests && npm run lint && npm run test && npm run build && npm run format-json"
"pre-commit": "npm run check-docs && npm run check-tests && npm run lint && npm run test && npm run build && npm run format-json && eclint fix ./src/**/* ./tests/**/*"
}
},
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions src/rules/arrowParens.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export default {
const paramToken = sourceCode.getTokenAfter(firstTokenOfParam);

/*
* ES8 allows Trailing commas in function parameter lists and calls
* https://github.com/eslint/eslint/issues/8834
*/
* ES8 allows Trailing commas in function parameter lists and calls
* https://github.com/eslint/eslint/issues/8834
*/
const closingParenToken = sourceCode.getTokenAfter(paramToken, isClosingParenToken);
const asyncToken = isAsync ? sourceCode.getTokenBefore(firstTokenOfParam) : null;
const shouldAddSpaceForAsync = asyncToken && asyncToken.range[1] === firstTokenOfParam.range[0];
Expand Down
1 change: 0 additions & 1 deletion src/rules/newlineAfterFlowAnnotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,3 @@ export default {
create,
schema,
};

1 change: 0 additions & 1 deletion src/rules/noExistentialType.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ const create = (context) => {
export default {
create,
};

4 changes: 2 additions & 2 deletions src/rules/requireReadonlyReactProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ const create = (context) => {
node,
});
} else if (node.superTypeParameters &&
node.superTypeParameters.params[0].type === 'ObjectTypeAnnotation' &&
!isReadOnlyObjectType(node.superTypeParameters.params[0])) {
node.superTypeParameters.params[0].type === 'ObjectTypeAnnotation' &&
!isReadOnlyObjectType(node.superTypeParameters.params[0])) {
context.report({
message: node.id.name + ' class props must be $ReadOnly',
node,
Expand Down
1 change: 0 additions & 1 deletion src/rules/validSyntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ export default {
},
schema,
};

1 change: 0 additions & 1 deletion src/utilities/isFlowFileAnnotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ export default (comment, strict) => {
return !strict || match[0] === '@flow';
});
};

1 change: 0 additions & 1 deletion tests/rules/assertions/newlineAfterFlowAnnotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ export default {
},
],
};

1 change: 0 additions & 1 deletion tests/rules/assertions/noExistentialType.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ export default {
},
],
};

1 change: 0 additions & 1 deletion tests/rules/assertions/typeImportStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ export default {
},
],
};

0 comments on commit 70b4fee

Please sign in to comment.