Skip to content

Commit

Permalink
new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeIpsum committed May 23, 2023
1 parent f81e1de commit 415b2d1
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 9 deletions.
30 changes: 29 additions & 1 deletion packages/eslint-config-ccs/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,33 @@
// disable requiring trailing commas because it might be nice to revert to
// being JSON at some point, and I don't want to make big changes now.
"comma-dangle": 0,
},
"object-curly-newline": 0,
"no-plusplus": 0,
"no-underscore-dangle": 0,
"global-require": 0,
"no-restricted-syntax": 0,
"no-labels": 0,
"no-shadow": 0,

// add eslint-import rules
"import/no-absolute-path": 0,
"import/no-unresolved": 0,
"import/extensions": ["error", "ignorePackages", {
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}],

// add react rules
"react/react-in-jsx-scope": 0,
"react/jsx-filename-extension": 0,
"react/require-default-props": 0,
"react/jsx-props-no-spreading": 0,
"react/button-has-type": 0,
"react/prop-types": 0,
"react/function-component-definition": [2, {
"namedComponents": "arrow-function"
}]
}
}
28 changes: 22 additions & 6 deletions packages/eslint-config-ccs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,27 @@ module.exports = {
rules: {
// base eslint overrides
quotes: ["error", "double"],
"object-curly-newline": 0,
"no-plusplus": 0,
"no-underscore-dangle": 0,
"no-restricted-syntax": 0,
"comma-dangle": 0,
"global-require": 0,
"logical-assignment-operators": 0,
"no-constant-binary-expression": 1,
"no-empty-static-block": 0,
"no-labels": 0,
"no-new-native-nonconstructor": 1,
"no-plusplus": 0,
"no-restricted-syntax": 0,
"no-shadow": 0,
"no-underscore-dangle": 0,
"object-curly-newline": 0,
"prefer-object-has-own": 0,

// eslint-plugin-import rules
"import/no-extraneous-dependencies": 0,
"import/prefer-default-export": 0,
"import/no-absolute-path": 0,
"import/no-dynamic-require": 0,
"import/no-empty-named-blocks": 1,
"import/no-extraneous-dependencies": 0,
"import/no-unresolved": 0,
"import/prefer-default-export": 0,
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"import/extensions": [
"error",
Expand All @@ -37,6 +42,17 @@ module.exports = {
tsx: "never"
}
],

// add react rules
"react/react-in-jsx-scope": 0,
"react/jsx-filename-extension": 0,
"react/require-default-props": 0,
"react/jsx-props-no-spreading": 0,
"react/button-has-type": 0,
"react/prop-types": 0,
"react/function-component-definition": [2, {
"namedComponents": "arrow-function"
}]
},
ignorePatterns: [
"**/.eslintrc.js"
Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-config-ccs/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ module.exports = {
"./tsconfig.json"
]
},
node: {
},
node: {},
}
}
};

0 comments on commit 415b2d1

Please sign in to comment.