Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monorepo #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions CHANGELOG.md

This file was deleted.

11 changes: 11 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Released under MIT License

Copyright (c) 2013 Mark Otto.

Copyright (c) 2017 Andrew Fong.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7 changes: 7 additions & 0 deletions javascript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Change Log

This project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.0-beta

* Moved Javascript config to a monorepo
File renamed without changes.
6 changes: 3 additions & 3 deletions package.json → javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eslint-config-wolox",
"version": "4.0.0",
"description": "ESLint configuration used by Wolox",
"name": "@eslint-config-wolox/javascript",
"version": "1.0.0",
"description": "Wolox's ESLint Javascript configuration",
"main": "index.js",
"repository": {
"type": "git",
Expand Down
5 changes: 0 additions & 5 deletions package-lock.json

This file was deleted.

8 changes: 8 additions & 0 deletions react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Change Log

This project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.0-beta

* Moved React config to a monorepo
* Removed eslint-config-wolox as a dependency
186 changes: 186 additions & 0 deletions react/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
"use strict";

module.exports = {
env: {
es6: true,
node: true,
browser: true,
jest: true
},
parser: "babel-eslint",
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true
},
sourceType: "module"
},
plugins: ["react", "import", "jsx-a11y", "babel", "react-hooks"],
globals: {
__DEV__: true
},
rules: {
// eslint-config-wolox overrides
"class-methods-use-this": [
"error",
{
exceptMethods: [
"render",
"getInitialState",
"getDefaultProps",
"componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"componentDidUpdate",
"componentWillUnmount",
"getSnapshotBeforeUpdate",
"UNSAFE_componentWillMount",
"UNSAFE_componentWillUpdate",
"UNSAFE_componentWillReceiveProps"
]
}
],
indent: "off",
"no-mixed-operators": "off",
"no-unused-expressions": "off",
"no-extra-parens": "off",

// Babel
"babel/no-unused-expressions": 1,

// Import
"import/default": "error",
"import/export": "error",
"import/extensions": [
"error",
"never",
{
js: "never",
svg: "always",
scss: "always",
png: "always",
css: "always",
json: "always"
}
],
"import/first": "error",
"import/namespace": "error",
"import/no-absolute-path": "error",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-named-default": "error",
"import/no-self-import": "error",
"import/no-unresolved": "error",
"import/no-webpack-loader-syntax": "error",
"import/order": [
"error",
{
"newlines-between": "always",
groups: [
"builtin",
"external",
["unknown", "internal"],
"parent",
"sibling",
"index"
]
}
],
"import/prefer-default-export": "off",

// jsx-a11y
"jsx-a11y/anchor-is-valid": "error",

// React
"react/boolean-prop-naming": "error",
"react/button-has-type": "error",
"react/default-props-match-prop-types": "error",
"react/forbid-dom-props": ["error", { forbid: ["style"] }],
"react/forbid-prop-types": "error",
"react/jsx-boolean-value": ["error", "never"],
"react/jsx-child-element-spacing": "error",
"react/jsx-closing-bracket-location": "error",
"react/jsx-closing-tag-location": "error",
"react/jsx-curly-brace-presence": [
"error",
{ props: "never", children: "never" }
],
"react/jsx-curly-spacing": "error",
"react/jsx-equals-spacing": "error",
"react/jsx-filename-extension": ["error", { extensions: [".js"] }],
"react/jsx-first-prop-new-line": "error",
"react/jsx-handler-names": "error",
"react/jsx-indent": ["error", 2],
"react/jsx-key": "error",
"react/jsx-max-depth": ["error", { max: 6 }],
"react/jsx-no-bind": ["error", { allowArrowFunctions: true }],
"react/jsx-no-comment-textnodes": "error",
"react/jsx-no-duplicate-props": "error",
"react/jsx-no-target-blank": "error",
"react/jsx-pascal-case": "error",
"react/jsx-props-no-multi-spaces": "error",
"react/jsx-sort-default-props": "error",
"react/jsx-tag-spacing": ["error", { beforeClosing: "never" }],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-wrap-multilines": [
"error",
{ declaration: false, assignment: false }
],
"react/forbid-foreign-prop-types": "error",
"react/no-access-state-in-setstate": "error",
"react/no-array-index-key": "error",
"react/no-children-prop": "error",
"react/no-danger": "error",
"react/no-deprecated": "error",
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "error",
"react/no-direct-mutation-state": "error",
"react/no-find-dom-node": "error",
"react/no-is-mounted": "error",
"react/no-multi-comp": "error",
"react/no-render-return-value": "error",
"react/no-typos": "error",
"react/no-string-refs": "error",
"react/no-this-in-sfc": "error",
"react/no-unescaped-entities": "error",
"react/no-unknown-property": "error",
"react/no-unsafe": "error",
"react/no-unused-prop-types": "error",
"react/no-unused-state": "error",
"react/no-will-update-set-state": "error",
"react/prefer-es6-class": "error",
"react/prefer-stateless-function": "error",
"react/prop-types": [2, { ignore: ["style", "children", "dispatch"] }],
"react/require-default-props": "off",
"react/react-in-jsx-scope": "error",
"react/require-render-return": "error",
"react/self-closing-comp": "error",
"react/sort-prop-types": [
"error",
{
ignoreCase: true,
callbacksLast: true,
requiredFirst: true,
sortShapeProp: true
}
],
"react/style-prop-object": "error",
"react/void-dom-elements-no-children": "error",

// React Hooks
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error"
},
settings: {
"import/resolver": {
node: {
extensions: [".js"]
}
}
}
};
32 changes: 32 additions & 0 deletions react/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@eslint-config-wolox/react",
"version": "2.0.1",
"description": "Wolox's ESLint configuration for React projects ",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/Wolox/eslint-config-wolox.git"
},
"keywords": [
"ESLint",
"React",
"Wolox"
],
"author": "Damián Finkelstein <dfinkelstein@wolox.com.ar>",
"license": "MIT",
"bugs": {
"url": "https://github.com/Wolox/eslint-config-wolox/issues"
},
"homepage": "https://github.com/Wolox/eslint-config-wolox#readme",
"peerDependencies": {
"eslint": "6.3.0",
"eslint-config-wolox": "3.0.1",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.14.3",
"eslint-plugin-babel": "5.3.0",
"prettier": "1.18.2",
"eslint-plugin-prettier": "3.1.0",
"eslint-plugin-react-hooks": "2.0.1"
}
}
8 changes: 8 additions & 0 deletions vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Change Log

This project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.0-beta

* Moved Vue config to a monorepo
* Removed eslint-config-wolox as a dependency
90 changes: 90 additions & 0 deletions vue/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
"use strict";

module.exports = {
plugins: ["vue"],
parser: "vue-eslint-parser",
rules: {
// Eslint Stylistic Issues - https://eslint.org/docs/rules/#stylistic-issues
"semi": ["error", "never"],

// Eslint plugin vue Issues - https://github.com/vuejs/eslint-plugin-vue#bulb-rules
"vue/no-async-in-computed-properties": "error",
"vue/no-dupe-keys": "error",
"vue/no-duplicate-attributes": "error",
"vue/no-parsing-error": "error",
"vue/no-reserved-keys": "error",
"vue/no-shared-component-data": "error",
"vue/no-side-effects-in-computed-properties": "error",
"vue/no-template-key": "error",
"vue/no-textarea-mustache": "error",
"vue/no-unused-components": "error",
"vue/no-unused-vars": "error",
"vue/no-use-v-if-with-v-for": "error",
"vue/require-prop-type-constructor": "error",
"vue/require-render-return": "error",
"vue/require-v-for-key": "error",
"vue/require-valid-default-prop": "error",
"vue/return-in-computed-property": "error",
"vue/valid-template-root": "error",
"vue/valid-v-bind": "error",
"vue/valid-v-cloak": "error",
"vue/valid-v-else-if": "error",
"vue/valid-v-else": "error",
"vue/valid-v-for": "error",
"vue/valid-v-html": "error",
"vue/valid-v-if": "error",
"vue/valid-v-model": "error",
"vue/valid-v-on": "error",
"vue/valid-v-once": "error",
"vue/valid-v-pre": "error",
"vue/valid-v-show": "error",
"vue/valid-v-text": "error",
"vue/attribute-hyphenation": ["error", "always"],
"vue/html-closing-bracket-newline": ["error", {
"singleline": "never",
"multiline": "always"
}],
"vue/html-closing-bracket-spacing": "error",
"vue/html-end-tags": "error",
"vue/html-indent": "error",
"vue/html-self-closing": "error",
"vue/max-attributes-per-line": ["error", {
"singleline": 3,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/mustache-interpolation-spacing": ["error", "always"],
"vue/name-property-casing": ["error", "PascalCase"],
"vue/no-multi-spaces": "error",
"vue/no-template-shadow": "error",
"vue/prop-name-casing": ["error", "camelCase"],
"vue/require-default-prop": "error",
"vue/require-prop-types": "error",
"vue/v-bind-style": "error",
"vue/v-on-style": "error",
"vue/attributes-order": "error",
"vue/html-quotes": ["error", "single"],
"vue/no-v-html": "warn",
"vue/order-in-components": "error",
"vue/this-in-template": ["error", "never"],
"vue/component-name-in-template-casing": ["error",
"kebab-case",
{
"ignores": []
}
],
"vue/multiline-html-element-content-newline": "error",
"vue/no-spaces-around-equal-signs-in-attribute": "error",
"vue/script-indent": "error",
"vue/singleline-html-element-content-newline": "off",
"prettier/prettier": ["error",
{
"printWidth": 110,
"singleQuote": true,
"semi": false
}
]
}
};
Loading