拿掉 build files

This commit is contained in:
2022-07-18 16:33:23 +08:00
parent 41e2287bcb
commit 3707f158a3
31953 changed files with 0 additions and 4411796 deletions
-61
View File
@@ -1,61 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [2.0.0](https://github.com/nuxt-community/eslint-module/compare/v1.2.0...v2.0.0) (2020-05-05)
### ⚠ BREAKING CHANGES
* drop support for eslint 5 ([28f7ce5](https://github.com/nuxt-community/eslint-module/commit/28f7ce5fb570c5a7bf8bc8093387bb967328f70a))
## [1.2.0](https://github.com/nuxt-community/eslint-module/compare/v1.1.0...v1.2.0) (2020-04-24)
### Features
* new option `extensions` ([#17](https://github.com/nuxt-community/eslint-module/issues/17)) ([4093800](https://github.com/nuxt-community/eslint-module/commit/40938001c0d61bad3a1d16afd15c4eb114bda803))
## [1.1.0](https://github.com/nuxt-community/eslint-module/compare/v1.0.0...v1.1.0) (2019-09-13)
## [1.0.0](https://github.com/nuxt-community/eslint-module/compare/v0.2.1...v1.0.0) (2019-07-26)
### [0.2.1](https://github.com/nuxt-community/eslint-module/compare/v0.2.0...v0.2.1) (2019-07-01)
### Bug Fixes
* add `eslint` in `peerDependencies` ([a17990d](https://github.com/nuxt-community/eslint-module/commit/a17990d))
## [0.2.0](https://github.com/nuxt-community/eslint-module/compare/v0.1.0...v0.2.0) (2019-06-27)
### Features
* watch config file ([1d8fa16](https://github.com/nuxt-community/eslint-module/commit/1d8fa16))
## [0.1.0](https://github.com/nuxt-community/eslint-module/compare/v0.0.1...v0.1.0) (2019-06-27)
### Features
* add options ([f1c9ebd](https://github.com/nuxt-community/eslint-module/commit/f1c9ebd))
* check if `eslint` is available ([#4](https://github.com/nuxt-community/eslint-module/issues/4)) ([5b8ef02](https://github.com/nuxt-community/eslint-module/commit/5b8ef02))
### Tests
* split tests in files ([55dc81b](https://github.com/nuxt-community/eslint-module/commit/55dc81b))
* **module:** move `example` to `test/fixture` ([b98ec30](https://github.com/nuxt-community/eslint-module/commit/b98ec30))
* **module:** use `get-port` ([ca93060](https://github.com/nuxt-community/eslint-module/commit/ca93060))
<a name="0.0.1"></a>
## 0.0.1 (2019-02-12)
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) Nuxt Community
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.
-179
View File
@@ -1,179 +0,0 @@
# @nuxtjs/eslint-module
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]
[![Codecov][codecov-src]][codecov-href]
[![License][license-src]][license-href]
> ESLint module for Nuxt.js
[📖 **Release Notes**](./CHANGELOG.md)
## Requirements
You need to ensure that you have `eslint` installed:
```bash
yarn add --dev eslint # or npm install --save-dev eslint
```
## Setup
1. Add `@nuxtjs/eslint-module` dependency to your project
```bash
yarn add --dev @nuxtjs/eslint-module # or npm install --save-dev @nuxtjs/eslint-module
```
2. Add `@nuxtjs/eslint-module` to the `buildModules` section of `nuxt.config.js`
```js
export default {
buildModules: [
// Simple usage
'@nuxtjs/eslint-module',
// With options
['@nuxtjs/eslint-module', { /* module options */ }]
]
}
```
:warning: If you are using Nuxt **< v2.9** you have to install the module as a `dependency` (No `--dev` or `--save-dev` flags) and use `modules` section in `nuxt.config.js` instead of `buildModules`.
### Using top level options
```js
export default {
buildModules: [
'@nuxtjs/eslint-module'
],
eslint: {
/* module options */
}
}
```
## Options
You can pass [eslint options](http://eslint.org/docs/developer-guide/nodejs-api#cliengine).
**Note**: That the config option you provide will be passed to the `CLIEngine`. This is a different set of options than what you'd specify in `package.json` or `.eslintrc`. See the [eslint docs](http://eslint.org/docs/developer-guide/nodejs-api#cliengine) for more detail.
### `cache`
- Type: `Boolean|String`
- Default: `false`
This option will enable caching of the linting results into a file. This is particularly useful in reducing linting time when doing a full build.
This can either be a `boolean` value or the cache directory path(ex: `'./.eslint-loader-cache'`).
If `cache: true` is used, the cache is written to the `./node_modules/.cache/eslint-loader` directory. This is the recommended usage.
### `eslintPath`
- Type: `String`
- Default: `eslint`
Path to `eslint` instance that will be used for linting. If the `eslintPath` is a folder like a official eslint, or specify a `formatter` option. Now you dont have to install `eslint`.
### `extensions`
- Type: `Array[String]`
- Default: `['ts', 'js', 'vue']`
Extensions that will be used by the loader.
### `fix`
- Type: `Boolean`
- Default: `false`
This option will enable [ESLint autofix feature](http://eslint.org/docs/user-guide/command-line-interface#fix).
**Be careful: this option will change source files.**
### `formatter`
- Type: `String|Function`
- Default: `stylish`
This option accepts a function that will have one argument: an array of eslint messages (object). The function must return the output as a string. You can use official [eslint formatters](https://eslint.org/docs/user-guide/formatters/).
### Errors and Warning
**By default the loader will auto adjust error reporting depending on eslint errors/warnings counts.** You can still force this behavior by using `emitError` **or** `emitWarning` options:
#### `emitError`
- Type: `Boolean`
- Default: `false`
Will always return errors, if this option is set to `true`.
#### `emitWarning`
- Type: `Boolean`
- Default: `false`
Will always return warnings, if option is set to `true`.
#### `failOnError`
- Type: `Boolean`
- Default: `false`
Will cause the module build to fail if there are any errors, if option is set to `true`.
#### `failOnWarning`
- Type: `Boolean`
- Default: `false`
Will cause the module build to fail if there are any warnings, if option is set to `true`.
#### `quiet`
- Type: `Boolean`
- Default: `false`
Will process and report errors only and ignore warnings, if this option is set to `true`.
#### `outputReport`
- Type: `Boolean|Object`
- Default: `false`
Write the output of the errors to a file, for example a checkstyle xml file for use for reporting on Jenkins CI.
The `filePath` is an absolute path or relative to the webpack config: `output.path`. You can pass in a different `formatter` for the output file, if none is passed in the default/configured formatter will be used.
## Development
1. Clone this repository
2. Install dependencies using `yarn install` or `npm install`
3. Start development server using `npm run dev`
## License
[MIT License](./LICENSE)
Copyright (c) Nuxt Community
<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/@nuxtjs/eslint-module/latest.svg
[npm-version-href]: https://npmjs.com/package/@nuxtjs/eslint-module
[npm-downloads-src]: https://img.shields.io/npm/dt/@nuxtjs/eslint-module.svg
[npm-downloads-href]: https://npmjs.com/package/@nuxtjs/eslint-module
[github-actions-ci-src]: https://github.com/nuxt-community/eslint-module/workflows/ci/badge.svg
[github-actions-ci-href]: https://github.com/nuxt-community/eslint-module/actions?query=workflow%3Aci
[codecov-src]: https://img.shields.io/codecov/c/github/nuxt-community/eslint-module.svg
[codecov-href]: https://codecov.io/gh/nuxt-community/eslint-module
[license-src]: https://img.shields.io/npm/l/@nuxtjs/eslint-module.svg
[license-href]: https://npmjs.com/package/@nuxtjs/eslint-module
-3
View File
@@ -1,3 +0,0 @@
const consola = require('consola')
module.exports = consola.withScope('nuxt:eslint')
-45
View File
@@ -1,45 +0,0 @@
const { resolve } = require('path')
const logger = require('./logger')
const { moduleExists } = require('./utils')
module.exports = function (moduleOptions) {
if (!moduleExists('eslint')) {
logger.warn(
'The dependency `eslint` not found.',
'Please run `yarn add eslint --dev` or `npm install eslint --save-dev`'
)
return
}
const options = {
extensions: ['ts', 'js', 'vue'],
...this.options.eslint,
...moduleOptions
}
const filesToWatch = [
'.eslintrc',
'.eslintrc.json',
'.eslintrc.yaml',
'.eslintrc.yml',
'.eslintrc.js'
]
this.options.watch.push(
...filesToWatch.map(file => resolve(this.options.rootDir, file))
)
this.extendBuild((config, { isDev, isClient }) => {
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
test: RegExp(`\\.(${options.extensions.join('|')})$`),
loader: 'eslint-loader',
exclude: /(node_modules)/,
options
})
}
})
}
module.exports.meta = require('../package.json')
-11
View File
@@ -1,11 +0,0 @@
const moduleExists = (name) => {
try {
return require.resolve(name)
} catch (e) /* istanbul ignore next */ {
return false
}
}
module.exports = {
moduleExists
}
-81
View File
@@ -1,81 +0,0 @@
{
"_args": [
[
"@nuxtjs/eslint-module@2.0.0",
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
]
],
"_development": true,
"_from": "@nuxtjs/eslint-module@2.0.0",
"_id": "@nuxtjs/eslint-module@2.0.0",
"_inBundle": false,
"_integrity": "sha512-uL3prMRwSBcxy583O11nMiUtfA2fxF7lZgCCUCsq4FNCqv320euJ7XE3KNZT6IVs/QJ1vaUNLC8tL4SZS99Tjw==",
"_location": "/@nuxtjs/eslint-module",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@nuxtjs/eslint-module@2.0.0",
"name": "@nuxtjs/eslint-module",
"escapedName": "@nuxtjs%2feslint-module",
"scope": "@nuxtjs",
"rawSpec": "2.0.0",
"saveSpec": null,
"fetchSpec": "2.0.0"
},
"_requiredBy": [
"#DEV:/"
],
"_resolved": "https://registry.npmjs.org/@nuxtjs/eslint-module/-/eslint-module-2.0.0.tgz",
"_spec": "2.0.0",
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
"bugs": {
"url": "https://github.com/nuxt-community/eslint-module/issues"
},
"contributors": [
{
"name": "Ricardo Gobbo de Souza",
"email": "ricardogobbosouza@yahoo.com.br"
}
],
"dependencies": {
"consola": "^2.11.3",
"eslint-loader": "^4.0.2"
},
"description": "ESLint module for Nuxt.js",
"devDependencies": {
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"@nuxtjs/eslint-config": "latest",
"@nuxtjs/module-test-utils": "latest",
"eslint": "latest",
"husky": "latest",
"jest": "latest",
"nuxt-edge": "latest",
"standard-version": "latest"
},
"files": [
"lib"
],
"homepage": "https://github.com/nuxt-community/eslint-module#readme",
"license": "MIT",
"main": "lib/module.js",
"name": "@nuxtjs/eslint-module",
"peerDependencies": {
"eslint": ">=6"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt-community/eslint-module.git"
},
"scripts": {
"dev": "nuxt test/fixture",
"lint": "eslint --ext .js,.vue .",
"release": "yarn test && standard-version && git push --follow-tags && npm publish",
"test": "yarn lint && jest"
},
"version": "2.0.0"
}