From eb2e32bab57df11bdfbbac19474eb16817d504fe Mon Sep 17 00:00:00 2001 From: Evilebot Tnawi Date: Thu, 28 Mar 2019 17:50:37 +0300 Subject: [PATCH] chore: import development (#387) --- .editorconfig | 2 +- .eslintrc | 15 - .eslintrc.js | 12 + .gitignore | 21 +- CONTRIBUTING.md | 150 +- README.md | 103 +- index.js | 26 +- lib/DevMiddlewareError.js | 4 +- lib/context.js | 17 +- lib/fs.js | 45 +- lib/middleware.js | 59 +- lib/reporter.js | 2 +- lib/util.js | 48 +- package-lock.json | 1766 ++++++++++++++--- package.json | 59 +- test/api.test.js | 13 +- test/compiler-callbacks.test.js | 23 +- test/file-system.test.js | 6 +- .../server-test/webpack.array.config.js | 57 +- .../webpack.client.server.config.js | 55 +- test/fixtures/server-test/webpack.config.js | 10 +- .../server-test/webpack.querystring.config.js | 10 +- test/fixtures/stat-options.js | 8 +- test/lazy.test.js | 14 +- test/log.test.js | 9 +- test/reporter.test.js | 23 +- test/server.test.js | 182 +- test/util.test.js | 171 +- 28 files changed, 2195 insertions(+), 715 deletions(-) delete mode 100644 .eslintrc create mode 100644 .eslintrc.js diff --git a/.editorconfig b/.editorconfig index 45946eaa2..9f89f364d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,5 +9,5 @@ insert_final_newline = true trim_trailing_whitespace = true [*.md] -insert_final_newline = false +insert_final_newline = true trim_trailing_whitespace = false diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 020fc3848..000000000 --- a/.eslintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "webpack", - "parserOptions": { - "sourceType": "script" - }, - "rules": { - "brace-style": ["error", "1tbs", { allowSingleLine: false }], - "comma-dangle": ["error", "never"], - "curly": ["error"], - "consistent-return": "off", - "no-param-reassign": "off", - "no-undefined": "off", - "strict": ["error", "safe"] - } -} diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..3f6c7a8ba --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,12 @@ +module.exports = { + root: true, + plugins: ['prettier'], + extends: ['@webpack-contrib/eslint-config-webpack'], + parserOptions: { + sourceType: 'script', + }, + rules: { + 'prettier/prettier': ['error'], + strict: ['error', 'safe'], + }, +}; diff --git a/.gitignore b/.gitignore index 4bb595f51..91c906800 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,17 @@ -.nyc_output -node_modules -coverage -*.lcov +/node_modules +.idea/ +/coverage +logs +*.log +npm-debug.log* +.eslintcache +/dist +/local +/reports +.DS_Store +Thumbs.db +.idea +*.iml +.vscode +*.sublime-project +*.sublime-workspace diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9278b3e0..f526397bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,47 +1,135 @@ -# Welcome! -:heart: Thanks for your interest and time in contributing to this project. +# Contributing in @webpack-contrib -## What We Use +We'd always love contributions to further improve the webpack / webpack-contrib ecosystem! +Here are the guidelines we'd like you to follow: -- Building: [Webpack](https://webpack.js.org) -- Linting: [ESLint](http://eslint.org/) -- NPM: [NPM as a Build Tool](https://css-tricks.com/using-npm-build-tool/) -- Testing: [Mocha](https://mochajs.org) +- [Questions and Problems](#question) +- [Issues and Bugs](#issue) +- [Feature Requests](#feature) +- [Pull Request Submission Guidelines](#submit-pr) +- [Commit Message Conventions](#commit) -## Forking and Cloning +## Got a Question or Problem? -You'll need to first fork this repository, and then clone it locally before you -can submit a Pull Request with your proposed changes. +Please submit support requests and questions to StackOverflow using the tag [[webpack]](http://stackoverflow.com/tags/webpack). +StackOverflow is better suited for this kind of support though you may also inquire in [Webpack Gitter](https://gitter.im/webpack/webpack). +The issue tracker is for bug reports and feature discussions. -Please see the following articles for help getting started with git: +## Found an Issue or Bug? -[Forking a Repository](https://help.github.com/articles/fork-a-repo/) -[Cloning a Repository](https://help.github.com/articles/cloning-a-repository/) +Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available. -## Pull Requests +We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we ask that you to provide a minimal reproduction scenario (github repo or failing test case). Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like: -Please lint and test your changes before submitting a Pull Request. You can lint your -changes by running: +- version of Webpack used +- version of the loader / plugin you are creating a bug report for +- the use-case that fails -```console -$ npm run lint +A minimal reproduce scenario allows us to quickly confirm a bug (or point out config problems) as well as confirm that we are fixing the right problem. + +We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it. + +Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced. + +## Feature Requests? + +You can _request_ a new feature by creating an issue on Github. + +If you would like to _implement_ a new feature, please submit an issue with a proposal for your work `first`, to be sure that particular makes sense for the project. + +## Pull Request Submission Guidelines + +Before you submit your Pull Request (PR) consider the following guidelines: + +- Search Github for an open or closed PR that relates to your submission. You don't want to duplicate effort. +- Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages. +- Fill out our `Pull Request Template`. Your pull request will not be considered if it is ignored. +- Please sign the `Contributor License Agreement (CLA)` when a pull request is opened. We cannot accept your pull request without this. Make sure you sign with the primary email address associated with your local / github account. + +### Webpack Contrib Commit Conventions + +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special +format that includes a **type**, a **scope** and a **subject**: + +``` +(): + + + +