diff --git a/.babelrc b/.babelrc index 1e789995f..4d6bb158d 100644 --- a/.babelrc +++ b/.babelrc @@ -1,13 +1,19 @@ { "presets": [ - "env", - "react", - "stage-0" + "es2015", + "es2017", + "stage-0", + [ + "env", + { + "targets": { + "browsers": ["last 3 versions", "not IE < 10"] + } + } + ] ], "plugins": [ - "transform-class-properties", - "transform-decorators", - "transform-react-constant-elements", - "transform-react-inline-elements" + "transform-runtime", + "add-module-exports" ] -} +} \ No newline at end of file diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 41e59cfef..000000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,58 +0,0 @@ -checks: - file-lines: - config: - threshold: 300 - method-count: - config: - threshold: 30 - method-lines: - config: - threshold: 40 - -ratings: - paths: - - build/** - - docs/** - - src/** - - test/** - -exclude_paths: - - coverage/* - - dist/* - -plugins: - eslint: - enabled: false - - duplication: - enabled: true - config: - languages: - javascript: - patterns: - - "src/**/*.js" - - "src/**/*.vue" - - "build/**/*.js" - - "test/**/*.js" - - "!src/**/*.test.js" - - markdownlint: - enabled: true - checks: - MD002: - enabled: false - MD013: - enabled: false - MD038: - enabled: false - MD026: - enabled: false - MD033: - enabled: false - MD014: - enabled: false - - fixme: - enabled: true - exclude_paths: - - ".github/" diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 61337bc42..000000000 --- a/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -# http://editorconfig.org -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -trim_trailing_whitespace = false -insert_final_newline = false diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 009af5438..000000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -dist -coverage diff --git a/.eslintrc b/.eslintrc index b91189b0c..7d74f883b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,64 +1,141 @@ { - "root": true, - "parserOptions": { - "parser": "babel-eslint", - "ecmaVersion": 2017, - "sourceType": "module" - }, "plugins": [ - "jest", - "vue" - ], - "extends": [ - "plugin:vue/essential" + "html" ], + "ecmaFeatures": { + "arrowFunctions": true, + "destructuring": true, + "classes": true, + "defaultParams": true, + "blockBindings": true, + "modules": true, + "objectLiteralComputedProperties": true, + "objectLiteralShorthandMethods": true, + "objectLiteralShorthandProperties": true, + "restParams": true, + "spread": true, + "forOf": true, + "generators": true, + "templateStrings": true, + "superInFunctions": true, + "experimentalObjectRestSpread": true + }, "env": { - "jest/globals": true + "browser": true, + "node": true + }, + "globals": { + "arguments": true, + "window": true, + "Promise": true + }, + "root": true, + "parserOptions": { + "sourceType": "module" }, + "parser": "babel-eslint", "rules": { - "semi": ["warn", "never"], - "space-before-function-paren": ["warn"], - "arrow-parens": 0, - "generator-star-spacing": "off", - "indent": "off", - "indent-legacy": ["error", 2], - "max-depth": [ - "error", - 4 - ], - "max-statements": [ - "error", - 30 - ], - "max-params": [ - "error", - 5 - ], - "max-nested-callbacks": [ - "error", - 3 - ], - "complexity": [ - "error", - { - "max": 6 - } - ], - "vue/valid-v-on": 0, - "vue/v-bind-style": [ - "error", - "shorthand" - ], - "vue/v-on-style": [ - "error", - "shorthand" - ], - "vue/name-property-casing": [ - "error", - "PascalCase" - ], - "vue/require-v-for-key": 0, - "vue/html-closing-bracket-spacing": ["error"], - "vue/no-unused-components": "off" + "arrow-parens": 2, + "arrow-spacing": [2, { + "before": true, + "after": true + }], + "brace-style": [2, "1tbs", { + "allowSingleLine": false + }], + "comma-dangle": [1, "never"], + "comma-spacing": [1, { + "before": false, + "after": true + }], + "comma-style": [2, "last"], + "consistent-this": [2, "self"], + "constructor-super": 2, + "curly": 2, + "default-case": 2, + "dot-location": [2, "property"], + "eol-last": 2, + "eqeqeq": [2, "smart"], + "indent": [2, 2, { + "SwitchCase": 1 + }], + "key-spacing": [1, { + "beforeColon": false, + "afterColon": true + }], + "max-nested-callbacks": [1, 4], + "new-cap": 1, + "new-parens": 1, + "newline-after-var": [2, "always"], + "no-array-constructor": 2, + "no-class-assign": 2, + "no-cond-assign": 2, + "no-const-assign": 2, + "no-constant-condition": 2, + "no-delete-var": 2, + "no-dupe-args": 2, + "no-dupe-class-members": 2, + "no-dupe-keys": 2, + "no-duplicate-case": 2, + "no-else-return": 1, + "no-empty": 2, + "no-eq-null": 2, + "no-eval": 2, + "no-ex-assign": 2, + "no-extend-native": 2, + "no-extra-boolean-cast": 2, + "no-extra-parens": 1, + "no-extra-semi": 2, + "no-floating-decimal": 2, + "no-func-assign": 2, + "no-implied-eval": 2, + "no-inner-declarations": 2, + "no-lonely-if": 2, + "no-loop-func": 2, + "no-mixed-spaces-and-tabs": 2, + "no-multi-spaces": 1, + "no-multi-str": 2, + "no-multiple-empty-lines": [1, { + "max": 2 + }], + "no-negated-in-lhs": 2, + "no-nested-ternary": 2, + "no-new": 2, + "no-new-func": 2, + "no-new-object": 2, + "no-new-wrappers": 2, + "no-obj-calls": 2, + "no-redeclare": 2, + "no-script-url": 2, + "no-self-compare": 2, + "no-spaced-func": 1, + "no-sparse-arrays": 2, + "no-this-before-super": 2, + "no-trailing-spaces": 1, + "no-undef": 2, + "no-undef-init": 2, + "no-unexpected-multiline": 2, + "no-unneeded-ternary": 2, + "no-unreachable": 2, + "no-unused-vars": 1, + "no-use-before-define": 1, + "one-var": [2, "never"], + "quote-props": [1, "as-needed"], + "quotes": [2, "single"], + "radix": 2, + "semi": [2, "always"], + "semi-spacing": [1, { + "before": false, + "after": true + }], + "keyword-spacing": 2, + "space-before-blocks": 2, + "space-before-function-paren": [2, "never"], + "space-infix-ops": 2, + "space-unary-ops": 2, + "strict": 0, + "use-isnan": 2, + "wrap-regex": 2, + "yoda": [2, "never"] } } diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md deleted file mode 100644 index 98d877dbf..000000000 --- a/.github/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at marcosvmmoura@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/.github/COMMIT_CONVENTION.md b/.github/COMMIT_CONVENTION.md deleted file mode 100644 index d5b892b66..000000000 --- a/.github/COMMIT_CONVENTION.md +++ /dev/null @@ -1,95 +0,0 @@ -# Git Commit Message Convention - -> This is adapted from [Vue.js's commit convention](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md). - -## Examples - -Appears under "Components" header, pencil subheader: - -``` -comp(MdPencil): add 'graphiteWidth' option -``` - -Appears under "UI Elements" header, pencil subheader: - -``` -ui(MdPencil): add 'graphiteWidth' option -``` - -Appears under "Core" header, pencil subheader: - -``` -core(MdPencil): add 'graphiteWidth' option -``` - -Appears under "Bug Fixes" header, graphite subheader, with a link to issue #28: - -``` -fix(MdGraphite): stop graphite breaking when width < 0.1 - -close #28 -``` - -Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: - -``` -perf(MdPencil): remove graphiteWidth option - -BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reason. -``` - -The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. - -``` -revert: feat(MdPencil): add 'graphiteWidth' option - -This reverts commit 667ecc1654a317a13331b17617d973392f415f02. -``` - -## Full Message Format - -A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: - -``` -(): - - - -