Update checked-in dependencies
This commit is contained in:
parent
3e913ef09d
commit
9660df3fcc
990 changed files with 74805 additions and 60149 deletions
10
node_modules/eslint-plugin-github/lib/configs/flat/browser.js
generated
vendored
10
node_modules/eslint-plugin-github/lib/configs/flat/browser.js
generated
vendored
|
|
@ -1,19 +1,19 @@
|
|||
const globals = require('globals')
|
||||
const github = require('../../plugin')
|
||||
const importPlugin = require('eslint-plugin-import')
|
||||
const escompatPlugin = require('eslint-plugin-escompat')
|
||||
const escompat = require('eslint-plugin-escompat')
|
||||
const {fixupPluginRules} = require('@eslint/compat')
|
||||
|
||||
module.exports = {
|
||||
...escompatPlugin.configs['flat/recommended'],
|
||||
...escompat.configs['flat/recommended'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
},
|
||||
},
|
||||
plugins: {importPlugin, escompatPlugin, github: fixupPluginRules(github)},
|
||||
plugins: {import: importPlugin, escompat, github: fixupPluginRules(github)},
|
||||
rules: {
|
||||
'escompatPlugin/no-dynamic-imports': 'off',
|
||||
'escompat/no-dynamic-imports': 'off',
|
||||
'github/async-currenttarget': 'error',
|
||||
'github/async-preventdefault': 'error',
|
||||
'github/get-attribute': 'error',
|
||||
|
|
@ -25,7 +25,7 @@ module.exports = {
|
|||
'github/no-useless-passive': 'error',
|
||||
'github/require-passive-events': 'error',
|
||||
'github/prefer-observers': 'error',
|
||||
'importPlugin/no-nodejs-modules': 'error',
|
||||
'import/no-nodejs-modules': 'error',
|
||||
'no-restricted-syntax': [
|
||||
'error',
|
||||
{
|
||||
|
|
|
|||
14
node_modules/eslint-plugin-github/lib/configs/flat/react.js
generated
vendored
14
node_modules/eslint-plugin-github/lib/configs/flat/react.js
generated
vendored
|
|
@ -12,23 +12,23 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
},
|
||||
plugins: {github: fixupPluginRules(github), jsxA11yPlugin},
|
||||
plugins: {github: fixupPluginRules(github), 'jsx-a11y': jsxA11yPlugin},
|
||||
rules: {
|
||||
'jsxA11yPlugin/role-supports-aria-props': 'off', // Override with github/a11y-role-supports-aria-props until https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/910 is resolved
|
||||
'jsx-a11y/role-supports-aria-props': 'off', // Override with github/a11y-role-supports-aria-props until https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/910 is resolved
|
||||
'github/a11y-aria-label-is-well-formatted': 'error',
|
||||
'github/a11y-no-visually-hidden-interactive-element': 'error',
|
||||
'github/a11y-no-title-attribute': 'error',
|
||||
'github/a11y-svg-has-accessible-name': 'error',
|
||||
'github/a11y-role-supports-aria-props': 'error',
|
||||
'jsxA11yPlugin/no-aria-hidden-on-focusable': 'error',
|
||||
'jsxA11yPlugin/no-autofocus': 'off',
|
||||
'jsxA11yPlugin/anchor-ambiguous-text': [
|
||||
'jsx-a11y/no-aria-hidden-on-focusable': 'error',
|
||||
'jsx-a11y/no-autofocus': 'off',
|
||||
'jsx-a11y/anchor-ambiguous-text': [
|
||||
'error',
|
||||
{
|
||||
words: ['this', 'more', 'read here', 'read more'],
|
||||
},
|
||||
],
|
||||
'jsxA11yPlugin/no-interactive-element-to-noninteractive-role': [
|
||||
'jsx-a11y/no-interactive-element-to-noninteractive-role': [
|
||||
'error',
|
||||
{
|
||||
tr: ['none', 'presentation'],
|
||||
|
|
@ -36,7 +36,7 @@ module.exports = {
|
|||
canvas: ['img'],
|
||||
},
|
||||
],
|
||||
'jsxA11yPlugin/no-redundant-roles': [
|
||||
'jsx-a11y/no-redundant-roles': [
|
||||
'error',
|
||||
{
|
||||
nav: ['navigation'], // default in eslint-plugin-jsx-a11y
|
||||
|
|
|
|||
64
node_modules/eslint-plugin-github/lib/configs/flat/recommended.js
generated
vendored
64
node_modules/eslint-plugin-github/lib/configs/flat/recommended.js
generated
vendored
|
|
@ -17,21 +17,21 @@ module.exports = {
|
|||
},
|
||||
plugins: {
|
||||
prettierPlugin,
|
||||
eslintComments,
|
||||
importPlugin,
|
||||
'eslint-comments': eslintComments,
|
||||
import: importPlugin,
|
||||
'i18n-text': fixupPluginRules(i18nTextPlugin),
|
||||
noOnlyTestsPlugin,
|
||||
'no-only-tests': noOnlyTestsPlugin,
|
||||
github: fixupPluginRules(github),
|
||||
},
|
||||
rules: {
|
||||
'constructor-super': 'error',
|
||||
'eslintComments/disable-enable-pair': 'off',
|
||||
'eslintComments/no-aggregating-enable': 'off',
|
||||
'eslintComments/no-duplicate-disable': 'error',
|
||||
'eslintComments/no-unlimited-disable': 'error',
|
||||
'eslintComments/no-unused-disable': 'error',
|
||||
'eslintComments/no-unused-enable': 'error',
|
||||
'eslintComments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
|
||||
'eslint-comments/disable-enable-pair': 'off',
|
||||
'eslint-comments/no-aggregating-enable': 'off',
|
||||
'eslint-comments/no-duplicate-disable': 'error',
|
||||
'eslint-comments/no-unlimited-disable': 'error',
|
||||
'eslint-comments/no-unused-disable': 'error',
|
||||
'eslint-comments/no-unused-enable': 'error',
|
||||
'eslint-comments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
|
||||
'github/filenames-match-regex': 'error',
|
||||
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
|
||||
'github/array-foreach': 'error',
|
||||
|
|
@ -39,15 +39,15 @@ module.exports = {
|
|||
'github/no-then': 'error',
|
||||
'github/no-dynamic-script-tag': 'error',
|
||||
'i18n-text/no-en': ['error'],
|
||||
'importPlugin/default': 'error',
|
||||
'importPlugin/export': 'error',
|
||||
'importPlugin/extensions': 'error',
|
||||
'importPlugin/first': 'error',
|
||||
'importPlugin/named': 'error',
|
||||
'importPlugin/namespace': 'error',
|
||||
'importPlugin/no-absolute-path': 'error',
|
||||
'importPlugin/no-amd': 'error',
|
||||
'importPlugin/no-anonymous-default-export': [
|
||||
'import/default': 'error',
|
||||
'import/export': 'error',
|
||||
'import/extensions': 'error',
|
||||
'import/first': 'error',
|
||||
'import/named': 'error',
|
||||
'import/namespace': 'error',
|
||||
'import/no-absolute-path': 'error',
|
||||
'import/no-amd': 'error',
|
||||
'import/no-anonymous-default-export': [
|
||||
'error',
|
||||
{
|
||||
allowAnonymousClass: false,
|
||||
|
|
@ -58,17 +58,17 @@ module.exports = {
|
|||
allowObject: true,
|
||||
},
|
||||
],
|
||||
'importPlugin/no-commonjs': 'error',
|
||||
'importPlugin/no-deprecated': 'error',
|
||||
'importPlugin/no-duplicates': 'error',
|
||||
'importPlugin/no-dynamic-require': 'error',
|
||||
'importPlugin/no-extraneous-dependencies': [0, {devDependencies: false}],
|
||||
'importPlugin/no-mutable-exports': 'error',
|
||||
'importPlugin/no-named-as-default': 'error',
|
||||
'importPlugin/no-named-as-default-member': 'error',
|
||||
'importPlugin/no-namespace': 'error',
|
||||
'importPlugin/no-unresolved': 'error',
|
||||
'importPlugin/no-webpack-loader-syntax': 'error',
|
||||
'import/no-commonjs': 'error',
|
||||
'import/no-deprecated': 'error',
|
||||
'import/no-duplicates': 'error',
|
||||
'import/no-dynamic-require': 'error',
|
||||
'import/no-extraneous-dependencies': [0, {devDependencies: false}],
|
||||
'import/no-mutable-exports': 'error',
|
||||
'import/no-named-as-default': 'error',
|
||||
'import/no-named-as-default-member': 'error',
|
||||
'import/no-namespace': 'error',
|
||||
'import/no-unresolved': 'error',
|
||||
'import/no-webpack-loader-syntax': 'error',
|
||||
'no-case-declarations': 'error',
|
||||
'no-class-assign': 'error',
|
||||
'no-compare-neg-zero': 'error',
|
||||
|
|
@ -100,7 +100,7 @@ module.exports = {
|
|||
'no-new-symbol': 'error',
|
||||
'no-obj-calls': 'error',
|
||||
'no-octal': 'error',
|
||||
'noOnlyTestsPlugin/no-only-tests': [
|
||||
'no-only-tests/no-only-tests': [
|
||||
'error',
|
||||
{
|
||||
block: ['describe', 'it', 'context', 'test', 'tape', 'fixture', 'serial', 'suite'],
|
||||
|
|
@ -139,7 +139,7 @@ module.exports = {
|
|||
eqeqeq: ['error', 'smart'],
|
||||
},
|
||||
settings: {
|
||||
'importPlugin/resolver': {
|
||||
'import/resolver': {
|
||||
node: {
|
||||
extensions: ['.js', '.ts'],
|
||||
},
|
||||
|
|
|
|||
7
node_modules/eslint-plugin-github/lib/configs/flat/typescript.js
generated
vendored
7
node_modules/eslint-plugin-github/lib/configs/flat/typescript.js
generated
vendored
|
|
@ -1,14 +1,13 @@
|
|||
const eslint = require('@eslint/js')
|
||||
const tseslint = require('typescript-eslint')
|
||||
const escompatPlugin = require('eslint-plugin-escompat')
|
||||
const escompat = require('eslint-plugin-escompat')
|
||||
const github = require('../../plugin')
|
||||
const {fixupPluginRules} = require('@eslint/compat')
|
||||
|
||||
module.exports = tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, {
|
||||
module.exports = tseslint.config(...tseslint.configs.recommended, ...escompat.configs['flat/typescript-2020'], {
|
||||
languageOptions: {
|
||||
parser: tseslint.parser,
|
||||
},
|
||||
plugins: {'@typescript-eslint': tseslint.plugin, escompatPlugin, github: fixupPluginRules(github)},
|
||||
plugins: {'@typescript-eslint': tseslint.plugin, escompat, github: fixupPluginRules(github)},
|
||||
rules: {
|
||||
camelcase: 'off',
|
||||
'no-unused-vars': 'off',
|
||||
|
|
|
|||
395
node_modules/eslint-plugin-github/node_modules/debug/CHANGELOG.md
generated
vendored
Normal file
395
node_modules/eslint-plugin-github/node_modules/debug/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,395 @@
|
|||
|
||||
3.1.0 / 2017-09-26
|
||||
==================
|
||||
|
||||
* Add `DEBUG_HIDE_DATE` env var (#486)
|
||||
* Remove ReDoS regexp in %o formatter (#504)
|
||||
* Remove "component" from package.json
|
||||
* Remove `component.json`
|
||||
* Ignore package-lock.json
|
||||
* Examples: fix colors printout
|
||||
* Fix: browser detection
|
||||
* Fix: spelling mistake (#496, @EdwardBetts)
|
||||
|
||||
3.0.1 / 2017-08-24
|
||||
==================
|
||||
|
||||
* Fix: Disable colors in Edge and Internet Explorer (#489)
|
||||
|
||||
3.0.0 / 2017-08-08
|
||||
==================
|
||||
|
||||
* Breaking: Remove DEBUG_FD (#406)
|
||||
* Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
|
||||
* Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
|
||||
* Addition: document `enabled` flag (#465)
|
||||
* Addition: add 256 colors mode (#481)
|
||||
* Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
|
||||
* Update: component: update "ms" to v2.0.0
|
||||
* Update: separate the Node and Browser tests in Travis-CI
|
||||
* Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
|
||||
* Update: separate Node.js and web browser examples for organization
|
||||
* Update: update "browserify" to v14.4.0
|
||||
* Fix: fix Readme typo (#473)
|
||||
|
||||
2.6.9 / 2017-09-22
|
||||
==================
|
||||
|
||||
* remove ReDoS regexp in %o formatter (#504)
|
||||
|
||||
2.6.8 / 2017-05-18
|
||||
==================
|
||||
|
||||
* Fix: Check for undefined on browser globals (#462, @marbemac)
|
||||
|
||||
2.6.7 / 2017-05-16
|
||||
==================
|
||||
|
||||
* Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
|
||||
* Fix: Inline extend function in node implementation (#452, @dougwilson)
|
||||
* Docs: Fix typo (#455, @msasad)
|
||||
|
||||
2.6.5 / 2017-04-27
|
||||
==================
|
||||
|
||||
* Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
|
||||
* Misc: clean up browser reference checks (#447, @thebigredgeek)
|
||||
* Misc: add npm-debug.log to .gitignore (@thebigredgeek)
|
||||
|
||||
|
||||
2.6.4 / 2017-04-20
|
||||
==================
|
||||
|
||||
* Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
|
||||
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
|
||||
* Misc: update "ms" to v0.7.3 (@tootallnate)
|
||||
|
||||
2.6.3 / 2017-03-13
|
||||
==================
|
||||
|
||||
* Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
|
||||
* Docs: Changelog fix (@thebigredgeek)
|
||||
|
||||
2.6.2 / 2017-03-10
|
||||
==================
|
||||
|
||||
* Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
|
||||
* Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
|
||||
* Docs: Add Slackin invite badge (@tootallnate)
|
||||
|
||||
2.6.1 / 2017-02-10
|
||||
==================
|
||||
|
||||
* Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
|
||||
* Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
|
||||
* Fix: IE8 "Expected identifier" error (#414, @vgoma)
|
||||
* Fix: Namespaces would not disable once enabled (#409, @musikov)
|
||||
|
||||
2.6.0 / 2016-12-28
|
||||
==================
|
||||
|
||||
* Fix: added better null pointer checks for browser useColors (@thebigredgeek)
|
||||
* Improvement: removed explicit `window.debug` export (#404, @tootallnate)
|
||||
* Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
|
||||
|
||||
2.5.2 / 2016-12-25
|
||||
==================
|
||||
|
||||
* Fix: reference error on window within webworkers (#393, @KlausTrainer)
|
||||
* Docs: fixed README typo (#391, @lurch)
|
||||
* Docs: added notice about v3 api discussion (@thebigredgeek)
|
||||
|
||||
2.5.1 / 2016-12-20
|
||||
==================
|
||||
|
||||
* Fix: babel-core compatibility
|
||||
|
||||
2.5.0 / 2016-12-20
|
||||
==================
|
||||
|
||||
* Fix: wrong reference in bower file (@thebigredgeek)
|
||||
* Fix: webworker compatibility (@thebigredgeek)
|
||||
* Fix: output formatting issue (#388, @kribblo)
|
||||
* Fix: babel-loader compatibility (#383, @escwald)
|
||||
* Misc: removed built asset from repo and publications (@thebigredgeek)
|
||||
* Misc: moved source files to /src (#378, @yamikuronue)
|
||||
* Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
|
||||
* Test: coveralls integration (#378, @yamikuronue)
|
||||
* Docs: simplified language in the opening paragraph (#373, @yamikuronue)
|
||||
|
||||
2.4.5 / 2016-12-17
|
||||
==================
|
||||
|
||||
* Fix: `navigator` undefined in Rhino (#376, @jochenberger)
|
||||
* Fix: custom log function (#379, @hsiliev)
|
||||
* Improvement: bit of cleanup + linting fixes (@thebigredgeek)
|
||||
* Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
|
||||
* Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
|
||||
|
||||
2.4.4 / 2016-12-14
|
||||
==================
|
||||
|
||||
* Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
|
||||
|
||||
2.4.3 / 2016-12-14
|
||||
==================
|
||||
|
||||
* Fix: navigation.userAgent error for react native (#364, @escwald)
|
||||
|
||||
2.4.2 / 2016-12-14
|
||||
==================
|
||||
|
||||
* Fix: browser colors (#367, @tootallnate)
|
||||
* Misc: travis ci integration (@thebigredgeek)
|
||||
* Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
|
||||
|
||||
2.4.1 / 2016-12-13
|
||||
==================
|
||||
|
||||
* Fix: typo that broke the package (#356)
|
||||
|
||||
2.4.0 / 2016-12-13
|
||||
==================
|
||||
|
||||
* Fix: bower.json references unbuilt src entry point (#342, @justmatt)
|
||||
* Fix: revert "handle regex special characters" (@tootallnate)
|
||||
* Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
|
||||
* Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
|
||||
* Improvement: allow colors in workers (#335, @botverse)
|
||||
* Improvement: use same color for same namespace. (#338, @lchenay)
|
||||
|
||||
2.3.3 / 2016-11-09
|
||||
==================
|
||||
|
||||
* Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
|
||||
* Fix: Returning `localStorage` saved values (#331, Levi Thomason)
|
||||
* Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
|
||||
|
||||
2.3.2 / 2016-11-09
|
||||
==================
|
||||
|
||||
* Fix: be super-safe in index.js as well (@TooTallNate)
|
||||
* Fix: should check whether process exists (Tom Newby)
|
||||
|
||||
2.3.1 / 2016-11-09
|
||||
==================
|
||||
|
||||
* Fix: Added electron compatibility (#324, @paulcbetts)
|
||||
* Improvement: Added performance optimizations (@tootallnate)
|
||||
* Readme: Corrected PowerShell environment variable example (#252, @gimre)
|
||||
* Misc: Removed yarn lock file from source control (#321, @fengmk2)
|
||||
|
||||
2.3.0 / 2016-11-07
|
||||
==================
|
||||
|
||||
* Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
|
||||
* Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
|
||||
* Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
|
||||
* Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
|
||||
* Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
|
||||
* Package: Update "ms" to 0.7.2 (#315, @DevSide)
|
||||
* Package: removed superfluous version property from bower.json (#207 @kkirsche)
|
||||
* Readme: fix USE_COLORS to DEBUG_COLORS
|
||||
* Readme: Doc fixes for format string sugar (#269, @mlucool)
|
||||
* Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
|
||||
* Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
|
||||
* Readme: better docs for browser support (#224, @matthewmueller)
|
||||
* Tooling: Added yarn integration for development (#317, @thebigredgeek)
|
||||
* Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
|
||||
* Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
|
||||
* Misc: Updated contributors (@thebigredgeek)
|
||||
|
||||
2.2.0 / 2015-05-09
|
||||
==================
|
||||
|
||||
* package: update "ms" to v0.7.1 (#202, @dougwilson)
|
||||
* README: add logging to file example (#193, @DanielOchoa)
|
||||
* README: fixed a typo (#191, @amir-s)
|
||||
* browser: expose `storage` (#190, @stephenmathieson)
|
||||
* Makefile: add a `distclean` target (#189, @stephenmathieson)
|
||||
|
||||
2.1.3 / 2015-03-13
|
||||
==================
|
||||
|
||||
* Updated stdout/stderr example (#186)
|
||||
* Updated example/stdout.js to match debug current behaviour
|
||||
* Renamed example/stderr.js to stdout.js
|
||||
* Update Readme.md (#184)
|
||||
* replace high intensity foreground color for bold (#182, #183)
|
||||
|
||||
2.1.2 / 2015-03-01
|
||||
==================
|
||||
|
||||
* dist: recompile
|
||||
* update "ms" to v0.7.0
|
||||
* package: update "browserify" to v9.0.3
|
||||
* component: fix "ms.js" repo location
|
||||
* changed bower package name
|
||||
* updated documentation about using debug in a browser
|
||||
* fix: security error on safari (#167, #168, @yields)
|
||||
|
||||
2.1.1 / 2014-12-29
|
||||
==================
|
||||
|
||||
* browser: use `typeof` to check for `console` existence
|
||||
* browser: check for `console.log` truthiness (fix IE 8/9)
|
||||
* browser: add support for Chrome apps
|
||||
* Readme: added Windows usage remarks
|
||||
* Add `bower.json` to properly support bower install
|
||||
|
||||
2.1.0 / 2014-10-15
|
||||
==================
|
||||
|
||||
* node: implement `DEBUG_FD` env variable support
|
||||
* package: update "browserify" to v6.1.0
|
||||
* package: add "license" field to package.json (#135, @panuhorsmalahti)
|
||||
|
||||
2.0.0 / 2014-09-01
|
||||
==================
|
||||
|
||||
* package: update "browserify" to v5.11.0
|
||||
* node: use stderr rather than stdout for logging (#29, @stephenmathieson)
|
||||
|
||||
1.0.4 / 2014-07-15
|
||||
==================
|
||||
|
||||
* dist: recompile
|
||||
* example: remove `console.info()` log usage
|
||||
* example: add "Content-Type" UTF-8 header to browser example
|
||||
* browser: place %c marker after the space character
|
||||
* browser: reset the "content" color via `color: inherit`
|
||||
* browser: add colors support for Firefox >= v31
|
||||
* debug: prefer an instance `log()` function over the global one (#119)
|
||||
* Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
|
||||
|
||||
1.0.3 / 2014-07-09
|
||||
==================
|
||||
|
||||
* Add support for multiple wildcards in namespaces (#122, @seegno)
|
||||
* browser: fix lint
|
||||
|
||||
1.0.2 / 2014-06-10
|
||||
==================
|
||||
|
||||
* browser: update color palette (#113, @gscottolson)
|
||||
* common: make console logging function configurable (#108, @timoxley)
|
||||
* node: fix %o colors on old node <= 0.8.x
|
||||
* Makefile: find node path using shell/which (#109, @timoxley)
|
||||
|
||||
1.0.1 / 2014-06-06
|
||||
==================
|
||||
|
||||
* browser: use `removeItem()` to clear localStorage
|
||||
* browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
|
||||
* package: add "contributors" section
|
||||
* node: fix comment typo
|
||||
* README: list authors
|
||||
|
||||
1.0.0 / 2014-06-04
|
||||
==================
|
||||
|
||||
* make ms diff be global, not be scope
|
||||
* debug: ignore empty strings in enable()
|
||||
* node: make DEBUG_COLORS able to disable coloring
|
||||
* *: export the `colors` array
|
||||
* npmignore: don't publish the `dist` dir
|
||||
* Makefile: refactor to use browserify
|
||||
* package: add "browserify" as a dev dependency
|
||||
* Readme: add Web Inspector Colors section
|
||||
* node: reset terminal color for the debug content
|
||||
* node: map "%o" to `util.inspect()`
|
||||
* browser: map "%j" to `JSON.stringify()`
|
||||
* debug: add custom "formatters"
|
||||
* debug: use "ms" module for humanizing the diff
|
||||
* Readme: add "bash" syntax highlighting
|
||||
* browser: add Firebug color support
|
||||
* browser: add colors for WebKit browsers
|
||||
* node: apply log to `console`
|
||||
* rewrite: abstract common logic for Node & browsers
|
||||
* add .jshintrc file
|
||||
|
||||
0.8.1 / 2014-04-14
|
||||
==================
|
||||
|
||||
* package: re-add the "component" section
|
||||
|
||||
0.8.0 / 2014-03-30
|
||||
==================
|
||||
|
||||
* add `enable()` method for nodejs. Closes #27
|
||||
* change from stderr to stdout
|
||||
* remove unnecessary index.js file
|
||||
|
||||
0.7.4 / 2013-11-13
|
||||
==================
|
||||
|
||||
* remove "browserify" key from package.json (fixes something in browserify)
|
||||
|
||||
0.7.3 / 2013-10-30
|
||||
==================
|
||||
|
||||
* fix: catch localStorage security error when cookies are blocked (Chrome)
|
||||
* add debug(err) support. Closes #46
|
||||
* add .browser prop to package.json. Closes #42
|
||||
|
||||
0.7.2 / 2013-02-06
|
||||
==================
|
||||
|
||||
* fix package.json
|
||||
* fix: Mobile Safari (private mode) is broken with debug
|
||||
* fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
|
||||
|
||||
0.7.1 / 2013-02-05
|
||||
==================
|
||||
|
||||
* add repository URL to package.json
|
||||
* add DEBUG_COLORED to force colored output
|
||||
* add browserify support
|
||||
* fix component. Closes #24
|
||||
|
||||
0.7.0 / 2012-05-04
|
||||
==================
|
||||
|
||||
* Added .component to package.json
|
||||
* Added debug.component.js build
|
||||
|
||||
0.6.0 / 2012-03-16
|
||||
==================
|
||||
|
||||
* Added support for "-" prefix in DEBUG [Vinay Pulim]
|
||||
* Added `.enabled` flag to the node version [TooTallNate]
|
||||
|
||||
0.5.0 / 2012-02-02
|
||||
==================
|
||||
|
||||
* Added: humanize diffs. Closes #8
|
||||
* Added `debug.disable()` to the CS variant
|
||||
* Removed padding. Closes #10
|
||||
* Fixed: persist client-side variant again. Closes #9
|
||||
|
||||
0.4.0 / 2012-02-01
|
||||
==================
|
||||
|
||||
* Added browser variant support for older browsers [TooTallNate]
|
||||
* Added `debug.enable('project:*')` to browser variant [TooTallNate]
|
||||
* Added padding to diff (moved it to the right)
|
||||
|
||||
0.3.0 / 2012-01-26
|
||||
==================
|
||||
|
||||
* Added millisecond diff when isatty, otherwise UTC string
|
||||
|
||||
0.2.0 / 2012-01-22
|
||||
==================
|
||||
|
||||
* Added wildcard support
|
||||
|
||||
0.1.0 / 2011-12-02
|
||||
==================
|
||||
|
||||
* Added: remove colors unless stderr isatty [TooTallNate]
|
||||
|
||||
0.0.1 / 2010-01-03
|
||||
==================
|
||||
|
||||
* Initial release
|
||||
19
node_modules/eslint-plugin-github/node_modules/debug/LICENSE
generated
vendored
Normal file
19
node_modules/eslint-plugin-github/node_modules/debug/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
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.
|
||||
|
||||
437
node_modules/eslint-plugin-github/node_modules/debug/README.md
generated
vendored
Normal file
437
node_modules/eslint-plugin-github/node_modules/debug/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,437 @@
|
|||
# debug
|
||||
[](https://travis-ci.org/visionmedia/debug) [](https://coveralls.io/github/visionmedia/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
|
||||
[](#sponsors)
|
||||
|
||||
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
|
||||
|
||||
A tiny JavaScript debugging utility modelled after Node.js core's debugging
|
||||
technique. Works in Node.js and web browsers.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
$ npm install debug
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
|
||||
|
||||
Example [_app.js_](./examples/node/app.js):
|
||||
|
||||
```js
|
||||
var debug = require('debug')('http')
|
||||
, http = require('http')
|
||||
, name = 'My App';
|
||||
|
||||
// fake app
|
||||
|
||||
debug('booting %o', name);
|
||||
|
||||
http.createServer(function(req, res){
|
||||
debug(req.method + ' ' + req.url);
|
||||
res.end('hello\n');
|
||||
}).listen(3000, function(){
|
||||
debug('listening');
|
||||
});
|
||||
|
||||
// fake worker of some kind
|
||||
|
||||
require('./worker');
|
||||
```
|
||||
|
||||
Example [_worker.js_](./examples/node/worker.js):
|
||||
|
||||
```js
|
||||
var a = require('debug')('worker:a')
|
||||
, b = require('debug')('worker:b');
|
||||
|
||||
function work() {
|
||||
a('doing lots of uninteresting work');
|
||||
setTimeout(work, Math.random() * 1000);
|
||||
}
|
||||
|
||||
work();
|
||||
|
||||
function workb() {
|
||||
b('doing some work');
|
||||
setTimeout(workb, Math.random() * 2000);
|
||||
}
|
||||
|
||||
workb();
|
||||
```
|
||||
|
||||
The `DEBUG` environment variable is then used to enable these based on space or
|
||||
comma-delimited names.
|
||||
|
||||
Here are some examples:
|
||||
|
||||
<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
|
||||
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
|
||||
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
|
||||
|
||||
#### Windows command prompt notes
|
||||
|
||||
##### CMD
|
||||
|
||||
On Windows the environment variable is set using the `set` command.
|
||||
|
||||
```cmd
|
||||
set DEBUG=*,-not_this
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```cmd
|
||||
set DEBUG=* & node app.js
|
||||
```
|
||||
|
||||
##### PowerShell (VS Code default)
|
||||
|
||||
PowerShell uses different syntax to set environment variables.
|
||||
|
||||
```cmd
|
||||
$env:DEBUG = "*,-not_this"
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```cmd
|
||||
$env:DEBUG='app';node app.js
|
||||
```
|
||||
|
||||
Then, run the program to be debugged as usual.
|
||||
|
||||
npm script example:
|
||||
```js
|
||||
"windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
|
||||
```
|
||||
|
||||
## Namespace Colors
|
||||
|
||||
Every debug instance has a color generated for it based on its namespace name.
|
||||
This helps when visually parsing the debug output to identify which debug instance
|
||||
a debug line belongs to.
|
||||
|
||||
#### Node.js
|
||||
|
||||
In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
|
||||
the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
|
||||
otherwise debug will only use a small handful of basic colors.
|
||||
|
||||
<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
|
||||
|
||||
#### Web Browser
|
||||
|
||||
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
|
||||
option. These are WebKit web inspectors, Firefox ([since version
|
||||
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
|
||||
and the Firebug plugin for Firefox (any version).
|
||||
|
||||
<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
|
||||
|
||||
|
||||
## Millisecond diff
|
||||
|
||||
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
|
||||
|
||||
<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
|
||||
|
||||
When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
|
||||
|
||||
<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
|
||||
|
||||
|
||||
## Conventions
|
||||
|
||||
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
|
||||
|
||||
## Wildcards
|
||||
|
||||
The `*` character may be used as a wildcard. Suppose for example your library has
|
||||
debuggers named "connect:bodyParser", "connect:compress", "connect:session",
|
||||
instead of listing all three with
|
||||
`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
|
||||
`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
|
||||
|
||||
You can also exclude specific debuggers by prefixing them with a "-" character.
|
||||
For example, `DEBUG=*,-connect:*` would include all debuggers except those
|
||||
starting with "connect:".
|
||||
|
||||
## Environment Variables
|
||||
|
||||
When running through Node.js, you can set a few environment variables that will
|
||||
change the behavior of the debug logging:
|
||||
|
||||
| Name | Purpose |
|
||||
|-----------|-------------------------------------------------|
|
||||
| `DEBUG` | Enables/disables specific debugging namespaces. |
|
||||
| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
|
||||
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
|
||||
| `DEBUG_DEPTH` | Object inspection depth. |
|
||||
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
|
||||
|
||||
|
||||
__Note:__ The environment variables beginning with `DEBUG_` end up being
|
||||
converted into an Options object that gets used with `%o`/`%O` formatters.
|
||||
See the Node.js documentation for
|
||||
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
|
||||
for the complete list.
|
||||
|
||||
## Formatters
|
||||
|
||||
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
|
||||
Below are the officially supported formatters:
|
||||
|
||||
| Formatter | Representation |
|
||||
|-----------|----------------|
|
||||
| `%O` | Pretty-print an Object on multiple lines. |
|
||||
| `%o` | Pretty-print an Object all on a single line. |
|
||||
| `%s` | String. |
|
||||
| `%d` | Number (both integer and float). |
|
||||
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
|
||||
| `%%` | Single percent sign ('%'). This does not consume an argument. |
|
||||
|
||||
|
||||
### Custom formatters
|
||||
|
||||
You can add custom formatters by extending the `debug.formatters` object.
|
||||
For example, if you wanted to add support for rendering a Buffer as hex with
|
||||
`%h`, you could do something like:
|
||||
|
||||
```js
|
||||
const createDebug = require('debug')
|
||||
createDebug.formatters.h = (v) => {
|
||||
return v.toString('hex')
|
||||
}
|
||||
|
||||
// …elsewhere
|
||||
const debug = createDebug('foo')
|
||||
debug('this is hex: %h', new Buffer('hello world'))
|
||||
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
|
||||
```
|
||||
|
||||
|
||||
## Browser Support
|
||||
|
||||
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
|
||||
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
|
||||
if you don't want to build it yourself.
|
||||
|
||||
Debug's enable state is currently persisted by `localStorage`.
|
||||
Consider the situation shown below where you have `worker:a` and `worker:b`,
|
||||
and wish to debug both. You can enable this using `localStorage.debug`:
|
||||
|
||||
```js
|
||||
localStorage.debug = 'worker:*'
|
||||
```
|
||||
|
||||
And then refresh the page.
|
||||
|
||||
```js
|
||||
a = debug('worker:a');
|
||||
b = debug('worker:b');
|
||||
|
||||
setInterval(function(){
|
||||
a('doing some work');
|
||||
}, 1000);
|
||||
|
||||
setInterval(function(){
|
||||
b('doing some work');
|
||||
}, 1200);
|
||||
```
|
||||
|
||||
|
||||
## Output streams
|
||||
|
||||
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
|
||||
|
||||
Example [_stdout.js_](./examples/node/stdout.js):
|
||||
|
||||
```js
|
||||
var debug = require('debug');
|
||||
var error = debug('app:error');
|
||||
|
||||
// by default stderr is used
|
||||
error('goes to stderr!');
|
||||
|
||||
var log = debug('app:log');
|
||||
// set this namespace to log via console.log
|
||||
log.log = console.log.bind(console); // don't forget to bind to console!
|
||||
log('goes to stdout');
|
||||
error('still goes to stderr!');
|
||||
|
||||
// set all output to go via console.info
|
||||
// overrides all per-namespace log settings
|
||||
debug.log = console.info.bind(console);
|
||||
error('now goes to stdout via console.info');
|
||||
log('still goes to stdout, but via console.info now');
|
||||
```
|
||||
|
||||
## Extend
|
||||
You can simply extend debugger
|
||||
```js
|
||||
const log = require('debug')('auth');
|
||||
|
||||
//creates new debug instance with extended namespace
|
||||
const logSign = log.extend('sign');
|
||||
const logLogin = log.extend('login');
|
||||
|
||||
log('hello'); // auth hello
|
||||
logSign('hello'); //auth:sign hello
|
||||
logLogin('hello'); //auth:login hello
|
||||
```
|
||||
|
||||
## Set dynamically
|
||||
|
||||
You can also enable debug dynamically by calling the `enable()` method :
|
||||
|
||||
```js
|
||||
let debug = require('debug');
|
||||
|
||||
console.log(1, debug.enabled('test'));
|
||||
|
||||
debug.enable('test');
|
||||
console.log(2, debug.enabled('test'));
|
||||
|
||||
debug.disable();
|
||||
console.log(3, debug.enabled('test'));
|
||||
|
||||
```
|
||||
|
||||
print :
|
||||
```
|
||||
1 false
|
||||
2 true
|
||||
3 false
|
||||
```
|
||||
|
||||
Usage :
|
||||
`enable(namespaces)`
|
||||
`namespaces` can include modes separated by a colon and wildcards.
|
||||
|
||||
Note that calling `enable()` completely overrides previously set DEBUG variable :
|
||||
|
||||
```
|
||||
$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
|
||||
=> false
|
||||
```
|
||||
|
||||
## Checking whether a debug target is enabled
|
||||
|
||||
After you've created a debug instance, you can determine whether or not it is
|
||||
enabled by checking the `enabled` property:
|
||||
|
||||
```javascript
|
||||
const debug = require('debug')('http');
|
||||
|
||||
if (debug.enabled) {
|
||||
// do stuff...
|
||||
}
|
||||
```
|
||||
|
||||
You can also manually toggle this property to force the debug instance to be
|
||||
enabled or disabled.
|
||||
|
||||
|
||||
## Authors
|
||||
|
||||
- TJ Holowaychuk
|
||||
- Nathan Rajlich
|
||||
- Andrew Rhyne
|
||||
|
||||
## Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
|
||||
|
||||
<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
|
||||
|
||||
## License
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
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.
|
||||
1
node_modules/eslint-plugin-github/node_modules/debug/node.js
generated
vendored
Normal file
1
node_modules/eslint-plugin-github/node_modules/debug/node.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
module.exports = require('./src/node');
|
||||
51
node_modules/eslint-plugin-github/node_modules/debug/package.json
generated
vendored
Normal file
51
node_modules/eslint-plugin-github/node_modules/debug/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "debug",
|
||||
"version": "3.2.7",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/visionmedia/debug.git"
|
||||
},
|
||||
"description": "small debugging utility",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"log",
|
||||
"debugger"
|
||||
],
|
||||
"files": [
|
||||
"src",
|
||||
"node.js",
|
||||
"dist/debug.js",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
||||
"contributors": [
|
||||
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
|
||||
"Andrew Rhyne <rhyneandrew@gmail.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.0.0",
|
||||
"@babel/core": "^7.0.0",
|
||||
"@babel/preset-env": "^7.0.0",
|
||||
"browserify": "14.4.0",
|
||||
"chai": "^3.5.0",
|
||||
"concurrently": "^3.1.0",
|
||||
"coveralls": "^3.0.2",
|
||||
"istanbul": "^0.4.5",
|
||||
"karma": "^3.0.0",
|
||||
"karma-chai": "^0.1.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"karma-phantomjs-launcher": "^1.0.2",
|
||||
"mocha": "^5.2.0",
|
||||
"mocha-lcov-reporter": "^1.2.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"xo": "^0.23.0"
|
||||
},
|
||||
"main": "./src/index.js",
|
||||
"browser": "./src/browser.js",
|
||||
"unpkg": "./dist/debug.js"
|
||||
}
|
||||
180
node_modules/eslint-plugin-github/node_modules/debug/src/browser.js
generated
vendored
Normal file
180
node_modules/eslint-plugin-github/node_modules/debug/src/browser.js
generated
vendored
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
"use strict";
|
||||
|
||||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
/* eslint-env browser */
|
||||
|
||||
/**
|
||||
* This is the web browser implementation of `debug()`.
|
||||
*/
|
||||
exports.log = log;
|
||||
exports.formatArgs = formatArgs;
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.useColors = useColors;
|
||||
exports.storage = localstorage();
|
||||
/**
|
||||
* Colors.
|
||||
*/
|
||||
|
||||
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
||||
/**
|
||||
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
||||
* and the Firebug extension (any Firefox version) are known
|
||||
* to support "%c" CSS customizations.
|
||||
*
|
||||
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
||||
*/
|
||||
// eslint-disable-next-line complexity
|
||||
|
||||
function useColors() {
|
||||
// NB: In an Electron preload script, document will be defined but not fully
|
||||
// initialized. Since we know we're in Chrome, we'll just detect this case
|
||||
// explicitly
|
||||
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
||||
return true;
|
||||
} // Internet Explorer and Edge do not support colors.
|
||||
|
||||
|
||||
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
||||
return false;
|
||||
} // Is webkit? http://stackoverflow.com/a/16459606/376773
|
||||
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
||||
|
||||
|
||||
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
||||
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
||||
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
||||
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
||||
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
||||
}
|
||||
/**
|
||||
* Colorize log arguments if enabled.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function formatArgs(args) {
|
||||
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
|
||||
|
||||
if (!this.useColors) {
|
||||
return;
|
||||
}
|
||||
|
||||
var c = 'color: ' + this.color;
|
||||
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
|
||||
// arguments passed either before or after the %c, so we need to
|
||||
// figure out the correct index to insert the CSS into
|
||||
|
||||
var index = 0;
|
||||
var lastC = 0;
|
||||
args[0].replace(/%[a-zA-Z%]/g, function (match) {
|
||||
if (match === '%%') {
|
||||
return;
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
if (match === '%c') {
|
||||
// We only are interested in the *last* %c
|
||||
// (the user may have provided their own)
|
||||
lastC = index;
|
||||
}
|
||||
});
|
||||
args.splice(lastC, 0, c);
|
||||
}
|
||||
/**
|
||||
* Invokes `console.log()` when available.
|
||||
* No-op when `console.log` is not a "function".
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function log() {
|
||||
var _console;
|
||||
|
||||
// This hackery is required for IE8/9, where
|
||||
// the `console.log` function doesn't have 'apply'
|
||||
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
|
||||
}
|
||||
/**
|
||||
* Save `namespaces`.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function save(namespaces) {
|
||||
try {
|
||||
if (namespaces) {
|
||||
exports.storage.setItem('debug', namespaces);
|
||||
} else {
|
||||
exports.storage.removeItem('debug');
|
||||
}
|
||||
} catch (error) {// Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Load `namespaces`.
|
||||
*
|
||||
* @return {String} returns the previously persisted debug modes
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function load() {
|
||||
var r;
|
||||
|
||||
try {
|
||||
r = exports.storage.getItem('debug');
|
||||
} catch (error) {} // Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
||||
|
||||
|
||||
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
||||
r = process.env.DEBUG;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
/**
|
||||
* Localstorage attempts to return the localstorage.
|
||||
*
|
||||
* This is necessary because safari throws
|
||||
* when a user disables cookies/localstorage
|
||||
* and you attempt to access it.
|
||||
*
|
||||
* @return {LocalStorage}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function localstorage() {
|
||||
try {
|
||||
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
||||
// The Browser also has localStorage in the global context.
|
||||
return localStorage;
|
||||
} catch (error) {// Swallow
|
||||
// XXX (@Qix-) should we be logging these?
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = require('./common')(exports);
|
||||
var formatters = module.exports.formatters;
|
||||
/**
|
||||
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
||||
*/
|
||||
|
||||
formatters.j = function (v) {
|
||||
try {
|
||||
return JSON.stringify(v);
|
||||
} catch (error) {
|
||||
return '[UnexpectedJSONParseError]: ' + error.message;
|
||||
}
|
||||
};
|
||||
|
||||
249
node_modules/eslint-plugin-github/node_modules/debug/src/common.js
generated
vendored
Normal file
249
node_modules/eslint-plugin-github/node_modules/debug/src/common.js
generated
vendored
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
"use strict";
|
||||
|
||||
/**
|
||||
* This is the common logic for both the Node.js and web browser
|
||||
* implementations of `debug()`.
|
||||
*/
|
||||
function setup(env) {
|
||||
createDebug.debug = createDebug;
|
||||
createDebug.default = createDebug;
|
||||
createDebug.coerce = coerce;
|
||||
createDebug.disable = disable;
|
||||
createDebug.enable = enable;
|
||||
createDebug.enabled = enabled;
|
||||
createDebug.humanize = require('ms');
|
||||
Object.keys(env).forEach(function (key) {
|
||||
createDebug[key] = env[key];
|
||||
});
|
||||
/**
|
||||
* Active `debug` instances.
|
||||
*/
|
||||
|
||||
createDebug.instances = [];
|
||||
/**
|
||||
* The currently active debug mode names, and names to skip.
|
||||
*/
|
||||
|
||||
createDebug.names = [];
|
||||
createDebug.skips = [];
|
||||
/**
|
||||
* Map of special "%n" handling functions, for the debug "format" argument.
|
||||
*
|
||||
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
||||
*/
|
||||
|
||||
createDebug.formatters = {};
|
||||
/**
|
||||
* Selects a color for a debug namespace
|
||||
* @param {String} namespace The namespace string for the for the debug instance to be colored
|
||||
* @return {Number|String} An ANSI color code for the given namespace
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function selectColor(namespace) {
|
||||
var hash = 0;
|
||||
|
||||
for (var i = 0; i < namespace.length; i++) {
|
||||
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
||||
hash |= 0; // Convert to 32bit integer
|
||||
}
|
||||
|
||||
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
||||
}
|
||||
|
||||
createDebug.selectColor = selectColor;
|
||||
/**
|
||||
* Create a debugger with the given `namespace`.
|
||||
*
|
||||
* @param {String} namespace
|
||||
* @return {Function}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function createDebug(namespace) {
|
||||
var prevTime;
|
||||
|
||||
function debug() {
|
||||
// Disabled?
|
||||
if (!debug.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
var self = debug; // Set `diff` timestamp
|
||||
|
||||
var curr = Number(new Date());
|
||||
var ms = curr - (prevTime || curr);
|
||||
self.diff = ms;
|
||||
self.prev = prevTime;
|
||||
self.curr = curr;
|
||||
prevTime = curr;
|
||||
args[0] = createDebug.coerce(args[0]);
|
||||
|
||||
if (typeof args[0] !== 'string') {
|
||||
// Anything else let's inspect with %O
|
||||
args.unshift('%O');
|
||||
} // Apply any `formatters` transformations
|
||||
|
||||
|
||||
var index = 0;
|
||||
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
||||
// If we encounter an escaped % then don't increase the array index
|
||||
if (match === '%%') {
|
||||
return match;
|
||||
}
|
||||
|
||||
index++;
|
||||
var formatter = createDebug.formatters[format];
|
||||
|
||||
if (typeof formatter === 'function') {
|
||||
var val = args[index];
|
||||
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
|
||||
|
||||
args.splice(index, 1);
|
||||
index--;
|
||||
}
|
||||
|
||||
return match;
|
||||
}); // Apply env-specific formatting (colors, etc.)
|
||||
|
||||
createDebug.formatArgs.call(self, args);
|
||||
var logFn = self.log || createDebug.log;
|
||||
logFn.apply(self, args);
|
||||
}
|
||||
|
||||
debug.namespace = namespace;
|
||||
debug.enabled = createDebug.enabled(namespace);
|
||||
debug.useColors = createDebug.useColors();
|
||||
debug.color = selectColor(namespace);
|
||||
debug.destroy = destroy;
|
||||
debug.extend = extend; // Debug.formatArgs = formatArgs;
|
||||
// debug.rawLog = rawLog;
|
||||
// env-specific initialization logic for debug instances
|
||||
|
||||
if (typeof createDebug.init === 'function') {
|
||||
createDebug.init(debug);
|
||||
}
|
||||
|
||||
createDebug.instances.push(debug);
|
||||
return debug;
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
var index = createDebug.instances.indexOf(this);
|
||||
|
||||
if (index !== -1) {
|
||||
createDebug.instances.splice(index, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function extend(namespace, delimiter) {
|
||||
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
||||
}
|
||||
/**
|
||||
* Enables a debug mode by namespaces. This can include modes
|
||||
* separated by a colon and wildcards.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function enable(namespaces) {
|
||||
createDebug.save(namespaces);
|
||||
createDebug.names = [];
|
||||
createDebug.skips = [];
|
||||
var i;
|
||||
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
||||
var len = split.length;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (!split[i]) {
|
||||
// ignore empty strings
|
||||
continue;
|
||||
}
|
||||
|
||||
namespaces = split[i].replace(/\*/g, '.*?');
|
||||
|
||||
if (namespaces[0] === '-') {
|
||||
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
||||
} else {
|
||||
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < createDebug.instances.length; i++) {
|
||||
var instance = createDebug.instances[i];
|
||||
instance.enabled = createDebug.enabled(instance.namespace);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Disable debug output.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function disable() {
|
||||
createDebug.enable('');
|
||||
}
|
||||
/**
|
||||
* Returns true if the given mode name is enabled, false otherwise.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function enabled(name) {
|
||||
if (name[name.length - 1] === '*') {
|
||||
return true;
|
||||
}
|
||||
|
||||
var i;
|
||||
var len;
|
||||
|
||||
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
||||
if (createDebug.skips[i].test(name)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
||||
if (createDebug.names[i].test(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Coerce `val`.
|
||||
*
|
||||
* @param {Mixed} val
|
||||
* @return {Mixed}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function coerce(val) {
|
||||
if (val instanceof Error) {
|
||||
return val.stack || val.message;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
createDebug.enable(createDebug.load());
|
||||
return createDebug;
|
||||
}
|
||||
|
||||
module.exports = setup;
|
||||
|
||||
12
node_modules/eslint-plugin-github/node_modules/debug/src/index.js
generated
vendored
Normal file
12
node_modules/eslint-plugin-github/node_modules/debug/src/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
/**
|
||||
* Detect Electron renderer / nwjs process, which is node, but we should
|
||||
* treat as a browser.
|
||||
*/
|
||||
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
||||
module.exports = require('./browser.js');
|
||||
} else {
|
||||
module.exports = require('./node.js');
|
||||
}
|
||||
|
||||
177
node_modules/eslint-plugin-github/node_modules/debug/src/node.js
generated
vendored
Normal file
177
node_modules/eslint-plugin-github/node_modules/debug/src/node.js
generated
vendored
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
"use strict";
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
var tty = require('tty');
|
||||
|
||||
var util = require('util');
|
||||
/**
|
||||
* This is the Node.js implementation of `debug()`.
|
||||
*/
|
||||
|
||||
|
||||
exports.init = init;
|
||||
exports.log = log;
|
||||
exports.formatArgs = formatArgs;
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.useColors = useColors;
|
||||
/**
|
||||
* Colors.
|
||||
*/
|
||||
|
||||
exports.colors = [6, 2, 3, 4, 5, 1];
|
||||
|
||||
try {
|
||||
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
var supportsColor = require('supports-color');
|
||||
|
||||
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
||||
exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
|
||||
}
|
||||
} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
||||
|
||||
/**
|
||||
* Build up the default `inspectOpts` object from the environment variables.
|
||||
*
|
||||
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
||||
*/
|
||||
|
||||
|
||||
exports.inspectOpts = Object.keys(process.env).filter(function (key) {
|
||||
return /^debug_/i.test(key);
|
||||
}).reduce(function (obj, key) {
|
||||
// Camel-case
|
||||
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
|
||||
return k.toUpperCase();
|
||||
}); // Coerce string value into JS value
|
||||
|
||||
var val = process.env[key];
|
||||
|
||||
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
||||
val = true;
|
||||
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
||||
val = false;
|
||||
} else if (val === 'null') {
|
||||
val = null;
|
||||
} else {
|
||||
val = Number(val);
|
||||
}
|
||||
|
||||
obj[prop] = val;
|
||||
return obj;
|
||||
}, {});
|
||||
/**
|
||||
* Is stdout a TTY? Colored output is enabled when `true`.
|
||||
*/
|
||||
|
||||
function useColors() {
|
||||
return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
||||
}
|
||||
/**
|
||||
* Adds ANSI color escape codes if enabled.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function formatArgs(args) {
|
||||
var name = this.namespace,
|
||||
useColors = this.useColors;
|
||||
|
||||
if (useColors) {
|
||||
var c = this.color;
|
||||
var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
|
||||
var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
|
||||
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
||||
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
|
||||
} else {
|
||||
args[0] = getDate() + name + ' ' + args[0];
|
||||
}
|
||||
}
|
||||
|
||||
function getDate() {
|
||||
if (exports.inspectOpts.hideDate) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return new Date().toISOString() + ' ';
|
||||
}
|
||||
/**
|
||||
* Invokes `util.format()` with the specified arguments and writes to stderr.
|
||||
*/
|
||||
|
||||
|
||||
function log() {
|
||||
return process.stderr.write(util.format.apply(util, arguments) + '\n');
|
||||
}
|
||||
/**
|
||||
* Save `namespaces`.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function save(namespaces) {
|
||||
if (namespaces) {
|
||||
process.env.DEBUG = namespaces;
|
||||
} else {
|
||||
// If you set a process.env field to null or undefined, it gets cast to the
|
||||
// string 'null' or 'undefined'. Just delete instead.
|
||||
delete process.env.DEBUG;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Load `namespaces`.
|
||||
*
|
||||
* @return {String} returns the previously persisted debug modes
|
||||
* @api private
|
||||
*/
|
||||
|
||||
|
||||
function load() {
|
||||
return process.env.DEBUG;
|
||||
}
|
||||
/**
|
||||
* Init logic for `debug` instances.
|
||||
*
|
||||
* Create a new `inspectOpts` object in case `useColors` is set
|
||||
* differently for a particular `debug` instance.
|
||||
*/
|
||||
|
||||
|
||||
function init(debug) {
|
||||
debug.inspectOpts = {};
|
||||
var keys = Object.keys(exports.inspectOpts);
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = require('./common')(exports);
|
||||
var formatters = module.exports.formatters;
|
||||
/**
|
||||
* Map %o to `util.inspect()`, all on a single line.
|
||||
*/
|
||||
|
||||
formatters.o = function (v) {
|
||||
this.inspectOpts.colors = this.useColors;
|
||||
return util.inspect(v, this.inspectOpts)
|
||||
.split('\n')
|
||||
.map(function (str) { return str.trim(); })
|
||||
.join(' ');
|
||||
};
|
||||
/**
|
||||
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
||||
*/
|
||||
|
||||
|
||||
formatters.O = function (v) {
|
||||
this.inspectOpts.colors = this.useColors;
|
||||
return util.inspect(v, this.inspectOpts);
|
||||
};
|
||||
|
||||
2024
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/CHANGELOG.md
generated
vendored
Normal file
2024
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/CHANGELOG.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
22
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/LICENSE
generated
vendored
Normal file
22
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Ben Mosher
|
||||
|
||||
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.
|
||||
|
||||
577
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/README.md
generated
vendored
Normal file
577
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,577 @@
|
|||
# eslint-plugin-import
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[](https://travis-ci.org/import-js/eslint-plugin-import)
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[](https://ci.appveyor.com/project/import-js/eslint-plugin-import/branch/main)
|
||||
[](https://www.npmjs.com/package/eslint-plugin-import)
|
||||
[](https://www.npmtrends.com/eslint-plugin-import)
|
||||
|
||||
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All the goodness that the ES2015+ static module syntax intends to provide, marked up in your editor.
|
||||
|
||||
**IF YOU ARE USING THIS WITH SUBLIME**: see the [bottom section](#sublimelinter-eslint) for important info.
|
||||
|
||||
## Rules
|
||||
|
||||
<!-- begin auto-generated rules list -->
|
||||
|
||||
💼 Configurations enabled in.\
|
||||
⚠️ Configurations set to warn in.\
|
||||
🚫 Configurations disabled in.\
|
||||
❗ Set in the `errors` configuration.\
|
||||
☑️ Set in the `recommended` configuration.\
|
||||
⌨️ Set in the `typescript` configuration.\
|
||||
🚸 Set in the `warnings` configuration.\
|
||||
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
|
||||
💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\
|
||||
❌ Deprecated.
|
||||
|
||||
### Helpful warnings
|
||||
|
||||
| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ |
|
||||
| :--------------------------------------------------------------------- | :------------------------------------------------------------------------------------ | :--- | :---- | :- | :- | :- | :- |
|
||||
| [export](docs/rules/export.md) | Forbid any invalid exports, i.e. re-export of the same name. | ❗ ☑️ | | | | | |
|
||||
| [no-deprecated](docs/rules/no-deprecated.md) | Forbid imported names marked with `@deprecated` documentation tag. | | | | | | |
|
||||
| [no-empty-named-blocks](docs/rules/no-empty-named-blocks.md) | Forbid empty named import blocks. | | | | 🔧 | 💡 | |
|
||||
| [no-extraneous-dependencies](docs/rules/no-extraneous-dependencies.md) | Forbid the use of extraneous packages. | | | | | | |
|
||||
| [no-mutable-exports](docs/rules/no-mutable-exports.md) | Forbid the use of mutable exports with `var` or `let`. | | | | | | |
|
||||
| [no-named-as-default](docs/rules/no-named-as-default.md) | Forbid use of exported name as identifier of default export. | | ☑️ 🚸 | | | | |
|
||||
| [no-named-as-default-member](docs/rules/no-named-as-default-member.md) | Forbid use of exported name as property of default export. | | ☑️ 🚸 | | | | |
|
||||
| [no-unused-modules](docs/rules/no-unused-modules.md) | Forbid modules without exports, or exports without matching import in another module. | | | | | | |
|
||||
|
||||
### Module systems
|
||||
|
||||
| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ |
|
||||
| :----------------------------------------------------------------- | :------------------------------------------------------------------- | :- | :- | :- | :- | :- | :- |
|
||||
| [no-amd](docs/rules/no-amd.md) | Forbid AMD `require` and `define` calls. | | | | | | |
|
||||
| [no-commonjs](docs/rules/no-commonjs.md) | Forbid CommonJS `require` calls and `module.exports` or `exports.*`. | | | | | | |
|
||||
| [no-import-module-exports](docs/rules/no-import-module-exports.md) | Forbid import statements with CommonJS module.exports. | | | | 🔧 | | |
|
||||
| [no-nodejs-modules](docs/rules/no-nodejs-modules.md) | Forbid Node.js builtin modules. | | | | | | |
|
||||
| [unambiguous](docs/rules/unambiguous.md) | Forbid potentially ambiguous parse goal (`script` vs. `module`). | | | | | | |
|
||||
|
||||
### Static analysis
|
||||
|
||||
| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ |
|
||||
| :--------------------------------------------------------------------- | :----------------------------------------------------------------------------------- | :--- | :- | :- | :- | :- | :- |
|
||||
| [default](docs/rules/default.md) | Ensure a default export is present, given a default import. | ❗ ☑️ | | | | | |
|
||||
| [named](docs/rules/named.md) | Ensure named imports correspond to a named export in the remote file. | ❗ ☑️ | | ⌨️ | | | |
|
||||
| [namespace](docs/rules/namespace.md) | Ensure imported namespaces contain dereferenced properties as they are dereferenced. | ❗ ☑️ | | | | | |
|
||||
| [no-absolute-path](docs/rules/no-absolute-path.md) | Forbid import of modules using absolute paths. | | | | 🔧 | | |
|
||||
| [no-cycle](docs/rules/no-cycle.md) | Forbid a module from importing a module with a dependency path back to itself. | | | | | | |
|
||||
| [no-dynamic-require](docs/rules/no-dynamic-require.md) | Forbid `require()` calls with expressions. | | | | | | |
|
||||
| [no-internal-modules](docs/rules/no-internal-modules.md) | Forbid importing the submodules of other modules. | | | | | | |
|
||||
| [no-relative-packages](docs/rules/no-relative-packages.md) | Forbid importing packages through relative paths. | | | | 🔧 | | |
|
||||
| [no-relative-parent-imports](docs/rules/no-relative-parent-imports.md) | Forbid importing modules from parent directories. | | | | | | |
|
||||
| [no-restricted-paths](docs/rules/no-restricted-paths.md) | Enforce which files can be imported in a given folder. | | | | | | |
|
||||
| [no-self-import](docs/rules/no-self-import.md) | Forbid a module from importing itself. | | | | | | |
|
||||
| [no-unresolved](docs/rules/no-unresolved.md) | Ensure imports point to a file/module that can be resolved. | ❗ ☑️ | | | | | |
|
||||
| [no-useless-path-segments](docs/rules/no-useless-path-segments.md) | Forbid unnecessary path segments in import and require statements. | | | | 🔧 | | |
|
||||
| [no-webpack-loader-syntax](docs/rules/no-webpack-loader-syntax.md) | Forbid webpack loader syntax in imports. | | | | | | |
|
||||
|
||||
### Style guide
|
||||
|
||||
| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ |
|
||||
| :------------------------------------------------------------------------------- | :------------------------------------------------------------------------- | :- | :---- | :- | :- | :- | :- |
|
||||
| [consistent-type-specifier-style](docs/rules/consistent-type-specifier-style.md) | Enforce or ban the use of inline type-only markers for named imports. | | | | 🔧 | | |
|
||||
| [dynamic-import-chunkname](docs/rules/dynamic-import-chunkname.md) | Enforce a leading comment with the webpackChunkName for dynamic imports. | | | | | 💡 | |
|
||||
| [exports-last](docs/rules/exports-last.md) | Ensure all exports appear after other statements. | | | | | | |
|
||||
| [extensions](docs/rules/extensions.md) | Ensure consistent use of file extension within the import path. | | | | | | |
|
||||
| [first](docs/rules/first.md) | Ensure all imports appear before other statements. | | | | 🔧 | | |
|
||||
| [group-exports](docs/rules/group-exports.md) | Prefer named exports to be grouped together in a single export declaration | | | | | | |
|
||||
| [imports-first](docs/rules/imports-first.md) | Replaced by `import/first`. | | | | 🔧 | | ❌ |
|
||||
| [max-dependencies](docs/rules/max-dependencies.md) | Enforce the maximum number of dependencies a module can have. | | | | | | |
|
||||
| [newline-after-import](docs/rules/newline-after-import.md) | Enforce a newline after import statements. | | | | 🔧 | | |
|
||||
| [no-anonymous-default-export](docs/rules/no-anonymous-default-export.md) | Forbid anonymous values as default exports. | | | | | | |
|
||||
| [no-default-export](docs/rules/no-default-export.md) | Forbid default exports. | | | | | | |
|
||||
| [no-duplicates](docs/rules/no-duplicates.md) | Forbid repeated import of the same module in multiple places. | | ☑️ 🚸 | | 🔧 | | |
|
||||
| [no-named-default](docs/rules/no-named-default.md) | Forbid named default exports. | | | | | | |
|
||||
| [no-named-export](docs/rules/no-named-export.md) | Forbid named exports. | | | | | | |
|
||||
| [no-namespace](docs/rules/no-namespace.md) | Forbid namespace (a.k.a. "wildcard" `*`) imports. | | | | 🔧 | | |
|
||||
| [no-unassigned-import](docs/rules/no-unassigned-import.md) | Forbid unassigned imports | | | | | | |
|
||||
| [order](docs/rules/order.md) | Enforce a convention in module import order. | | | | 🔧 | | |
|
||||
| [prefer-default-export](docs/rules/prefer-default-export.md) | Prefer a default export if module exports a single name or multiple names. | | | | | | |
|
||||
|
||||
<!-- end auto-generated rules list -->
|
||||
|
||||
## `eslint-plugin-import` for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
||||
The maintainers of `eslint-plugin-import` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-eslint-plugin-import?utm_source=npm-eslint-plugin-import&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
# inside your project's working tree
|
||||
npm install eslint-plugin-import --save-dev
|
||||
```
|
||||
|
||||
### Config - Legacy (`.eslintrc`)
|
||||
|
||||
All rules are off by default. However, you may extend one of the preset configs, or configure them manually in your `.eslintrc.(yml|json|js)`.
|
||||
|
||||
- Extending a preset config:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:import/recommended",
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
- Configuring manually:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"rules": {
|
||||
"import/no-unresolved": ["error", { "commonjs": true, "amd": true }]
|
||||
"import/named": "error",
|
||||
"import/namespace": "error",
|
||||
"import/default": "error",
|
||||
"import/export": "error",
|
||||
// etc...
|
||||
},
|
||||
},
|
||||
```
|
||||
|
||||
### Config - Flat (`eslint.config.js`)
|
||||
|
||||
All rules are off by default. However, you may configure them manually in your `eslint.config.(js|cjs|mjs)`, or extend one of the preset configs:
|
||||
|
||||
```js
|
||||
import importPlugin from 'eslint-plugin-import';
|
||||
import js from '@eslint/js';
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
importPlugin.flatConfigs.recommended,
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
},
|
||||
rules: {
|
||||
'no-unused-vars': 'off',
|
||||
'import/no-dynamic-require': 'warn',
|
||||
'import/no-nodejs-modules': 'warn',
|
||||
},
|
||||
},
|
||||
];
|
||||
```
|
||||
|
||||
## TypeScript
|
||||
|
||||
You may use the following snippet or assemble your own config using the granular settings described below it.
|
||||
|
||||
Make sure you have installed [`@typescript-eslint/parser`] and [`eslint-import-resolver-typescript`] which are used in the following configuration.
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:import/recommended",
|
||||
// the following lines do the trick
|
||||
"plugin:import/typescript",
|
||||
],
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
// You will also need to install and configure the TypeScript resolver
|
||||
// See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
|
||||
"typescript": true,
|
||||
"node": true,
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
[`@typescript-eslint/parser`]: https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser
|
||||
[`eslint-import-resolver-typescript`]: https://github.com/import-js/eslint-import-resolver-typescript
|
||||
|
||||
## Resolvers
|
||||
|
||||
With the advent of module bundlers and the current state of modules and module
|
||||
syntax specs, it's not always obvious where `import x from 'module'` should look
|
||||
to find the file behind `module`.
|
||||
|
||||
Up through v0.10ish, this plugin has directly used substack's [`resolve`] plugin,
|
||||
which implements Node's import behavior. This works pretty well in most cases.
|
||||
|
||||
However, webpack allows a number of things in import module source strings that
|
||||
Node does not, such as loaders (`import 'file!./whatever'`) and a number of
|
||||
aliasing schemes, such as [`externals`]: mapping a module id to a global name at
|
||||
runtime (allowing some modules to be included more traditionally via script tags).
|
||||
|
||||
In the interest of supporting both of these, v0.11 introduces resolvers.
|
||||
|
||||
Currently [Node] and [webpack] resolution have been implemented, but the
|
||||
resolvers are just npm packages, so [third party packages are supported](https://github.com/import-js/eslint-plugin-import/wiki/Resolvers) (and encouraged!).
|
||||
|
||||
You can reference resolvers in several ways (in order of precedence):
|
||||
|
||||
- as a conventional `eslint-import-resolver` name, like `eslint-import-resolver-foo`:
|
||||
|
||||
```jsonc
|
||||
// .eslintrc
|
||||
{
|
||||
"settings": {
|
||||
// uses 'eslint-import-resolver-foo':
|
||||
"import/resolver": "foo",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
```yaml
|
||||
# .eslintrc.yml
|
||||
settings:
|
||||
# uses 'eslint-import-resolver-foo':
|
||||
import/resolver: foo
|
||||
```
|
||||
|
||||
```js
|
||||
// .eslintrc.js
|
||||
module.exports = {
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
foo: { someConfig: value }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- with a full npm module name, like `my-awesome-npm-module`:
|
||||
|
||||
```jsonc
|
||||
// .eslintrc
|
||||
{
|
||||
"settings": {
|
||||
"import/resolver": "my-awesome-npm-module",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
```yaml
|
||||
# .eslintrc.yml
|
||||
settings:
|
||||
import/resolver: 'my-awesome-npm-module'
|
||||
```
|
||||
|
||||
```js
|
||||
// .eslintrc.js
|
||||
module.exports = {
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
'my-awesome-npm-module': { someConfig: value }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- with a filesystem path to resolver, defined in this example as a `computed property` name:
|
||||
|
||||
```js
|
||||
// .eslintrc.js
|
||||
module.exports = {
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
[path.resolve('../../../my-resolver')]: { someConfig: value }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Relative paths will be resolved relative to the source's nearest `package.json` or
|
||||
the process's current working directory if no `package.json` is found.
|
||||
|
||||
If you are interesting in writing a resolver, see the [spec](./resolvers/README.md) for more details.
|
||||
|
||||
[`resolve`]: https://www.npmjs.com/package/resolve
|
||||
[`externals`]: https://webpack.github.io/docs/library-and-externals.html
|
||||
|
||||
[Node]: https://www.npmjs.com/package/eslint-import-resolver-node
|
||||
[webpack]: https://www.npmjs.com/package/eslint-import-resolver-webpack
|
||||
|
||||
## Settings
|
||||
|
||||
You may set the following settings in your `.eslintrc`:
|
||||
|
||||
### `import/extensions`
|
||||
|
||||
A list of file extensions that will be parsed as modules and inspected for
|
||||
`export`s.
|
||||
|
||||
This defaults to `['.js']`, unless you are using the `react` shared config,
|
||||
in which case it is specified as `['.js', '.jsx']`. Despite the default,
|
||||
if you are using TypeScript (without the `plugin:import/typescript` config
|
||||
described above) you must specify the new extensions (`.ts`, and also `.tsx`
|
||||
if using React).
|
||||
|
||||
```js
|
||||
"settings": {
|
||||
"import/extensions": [
|
||||
".js",
|
||||
".jsx"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
If you require more granular extension definitions, you can use:
|
||||
|
||||
```js
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"extensions": [
|
||||
".js",
|
||||
".jsx"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note that this is different from (and likely a subset of) any `import/resolver`
|
||||
extensions settings, which may include `.json`, `.coffee`, etc. which will still
|
||||
factor into the `no-unresolved` rule.
|
||||
|
||||
Also, the following `import/ignore` patterns will overrule this list.
|
||||
|
||||
### `import/ignore`
|
||||
|
||||
A list of regex strings that, if matched by a path, will
|
||||
not report the matching module if no `export`s are found.
|
||||
In practice, this means rules other than [`no-unresolved`](./docs/rules/no-unresolved.md#ignore) will not report on any
|
||||
`import`s with (absolute filesystem) paths matching this pattern.
|
||||
|
||||
`no-unresolved` has its own [`ignore`](./docs/rules/no-unresolved.md#ignore) setting.
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"settings": {
|
||||
"import/ignore": [
|
||||
"\.coffee$", // fraught with parse errors
|
||||
"\.(scss|less|css)$", // can't parse unprocessed CSS modules, either
|
||||
],
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### `import/core-modules`
|
||||
|
||||
An array of additional modules to consider as "core" modules--modules that should
|
||||
be considered resolved but have no path on the filesystem. Your resolver may
|
||||
already define some of these (for example, the Node resolver knows about `fs` and
|
||||
`path`), so you need not redefine those.
|
||||
|
||||
For example, Electron exposes an `electron` module:
|
||||
|
||||
```js
|
||||
import 'electron' // without extra config, will be flagged as unresolved!
|
||||
```
|
||||
|
||||
that would otherwise be unresolved. To avoid this, you may provide `electron` as a
|
||||
core module:
|
||||
|
||||
```jsonc
|
||||
// .eslintrc
|
||||
{
|
||||
"settings": {
|
||||
"import/core-modules": ["electron"],
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
In Electron's specific case, there is a shared config named `electron`
|
||||
that specifies this for you.
|
||||
|
||||
Contribution of more such shared configs for other platforms are welcome!
|
||||
|
||||
### `import/external-module-folders`
|
||||
|
||||
An array of folders. Resolved modules only from those folders will be considered as "external". By default - `["node_modules"]`. Makes sense if you have configured your path or webpack to handle your internal paths differently and want to consider modules from some folders, for example `bower_components` or `jspm_modules`, as "external".
|
||||
|
||||
This option is also useful in a monorepo setup: list here all directories that contain monorepo's packages and they will be treated as external ones no matter which resolver is used.
|
||||
|
||||
If you are using `yarn` PnP as your package manager, add the `.yarn` folder and all your installed dependencies will be considered as `external`, instead of `internal`.
|
||||
|
||||
Each item in this array is either a folder's name, its subpath, or its absolute prefix path:
|
||||
|
||||
- `jspm_modules` will match any file or folder named `jspm_modules` or which has a direct or non-direct parent named `jspm_modules`, e.g. `/home/me/project/jspm_modules` or `/home/me/project/jspm_modules/some-pkg/index.js`.
|
||||
|
||||
- `packages/core` will match any path that contains these two segments, for example `/home/me/project/packages/core/src/utils.js`.
|
||||
|
||||
- `/home/me/project/packages` will only match files and directories inside this directory, and the directory itself.
|
||||
|
||||
Please note that incomplete names are not allowed here so `components` won't match `bower_components` and `packages/ui` won't match `packages/ui-utils` (but will match `packages/ui/utils`).
|
||||
|
||||
### `import/parsers`
|
||||
|
||||
A map from parsers to file extension arrays. If a file extension is matched, the
|
||||
dependency parser will require and use the map key as the parser instead of the
|
||||
configured ESLint parser. This is useful if you're inter-op-ing with TypeScript
|
||||
directly using webpack, for example:
|
||||
|
||||
```jsonc
|
||||
// .eslintrc
|
||||
{
|
||||
"settings": {
|
||||
"import/parsers": {
|
||||
"@typescript-eslint/parser": [".ts", ".tsx"],
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
In this case, [`@typescript-eslint/parser`](https://www.npmjs.com/package/@typescript-eslint/parser)
|
||||
must be installed and require-able from the running `eslint` module's location
|
||||
(i.e., install it as a peer of ESLint).
|
||||
|
||||
This is currently only tested with `@typescript-eslint/parser` (and its predecessor,
|
||||
`typescript-eslint-parser`) but should theoretically work with any moderately
|
||||
ESTree-compliant parser.
|
||||
|
||||
It's difficult to say how well various plugin features will be supported, too,
|
||||
depending on how far down the rabbit hole goes. Submit an issue if you find strange
|
||||
behavior beyond here, but steel your heart against the likely outcome of closing
|
||||
with `wontfix`.
|
||||
|
||||
### `import/resolver`
|
||||
|
||||
See [resolvers](#resolvers).
|
||||
|
||||
### `import/cache`
|
||||
|
||||
Settings for cache behavior. Memoization is used at various levels to avoid the copious amount of `fs.statSync`/module parse calls required to correctly report errors.
|
||||
|
||||
For normal `eslint` console runs, the cache lifetime is irrelevant, as we can strongly assume that files should not be changing during the lifetime of the linter process (and thus, the cache in memory)
|
||||
|
||||
For long-lasting processes, like [`eslint_d`] or [`eslint-loader`], however, it's important that there be some notion of staleness.
|
||||
|
||||
If you never use [`eslint_d`] or [`eslint-loader`], you may set the cache lifetime to `Infinity` and everything should be fine:
|
||||
|
||||
```jsonc
|
||||
// .eslintrc
|
||||
{
|
||||
"settings": {
|
||||
"import/cache": {
|
||||
"lifetime": "∞", // or Infinity, in a JS config
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Otherwise, set some integer, and cache entries will be evicted after that many seconds have elapsed:
|
||||
|
||||
```jsonc
|
||||
// .eslintrc
|
||||
{
|
||||
"settings": {
|
||||
"import/cache": {
|
||||
"lifetime": 5, // 30 is the default
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
[`eslint_d`]: https://www.npmjs.com/package/eslint_d
|
||||
[`eslint-loader`]: https://www.npmjs.com/package/eslint-loader
|
||||
|
||||
### `import/internal-regex`
|
||||
|
||||
A regex for packages should be treated as internal. Useful when you are utilizing a monorepo setup or developing a set of packages that depend on each other.
|
||||
|
||||
By default, any package referenced from [`import/external-module-folders`](#importexternal-module-folders) will be considered as "external", including packages in a monorepo like yarn workspace or lerna environment. If you want to mark these packages as "internal" this will be useful.
|
||||
|
||||
For example, if your packages in a monorepo are all in `@scope`, you can configure `import/internal-regex` like this
|
||||
|
||||
```jsonc
|
||||
// .eslintrc
|
||||
{
|
||||
"settings": {
|
||||
"import/internal-regex": "^@scope/",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
## SublimeLinter-eslint
|
||||
|
||||
SublimeLinter-eslint introduced a change to support `.eslintignore` files
|
||||
which altered the way file paths are passed to ESLint when linting during editing.
|
||||
This change sends a relative path instead of the absolute path to the file (as ESLint
|
||||
normally provides), which can make it impossible for this plugin to resolve dependencies
|
||||
on the filesystem.
|
||||
|
||||
This workaround should no longer be necessary with the release of ESLint 2.0, when
|
||||
`.eslintignore` will be updated to work more like a `.gitignore`, which should
|
||||
support proper ignoring of absolute paths via `--stdin-filename`.
|
||||
|
||||
In the meantime, see [roadhump/SublimeLinter-eslint#58](https://github.com/roadhump/SublimeLinter-eslint/issues/58)
|
||||
for more details and discussion, but essentially, you may find you need to add the following
|
||||
`SublimeLinter` config to your Sublime project file:
|
||||
|
||||
```json
|
||||
{
|
||||
"folders":
|
||||
[
|
||||
{
|
||||
"path": "code"
|
||||
}
|
||||
],
|
||||
"SublimeLinter":
|
||||
{
|
||||
"linters":
|
||||
{
|
||||
"eslint":
|
||||
{
|
||||
"chdir": "${project}/code"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note that `${project}/code` matches the `code` provided at `folders[0].path`.
|
||||
|
||||
The purpose of the `chdir` setting, in this case, is to set the working directory
|
||||
from which ESLint is executed to be the same as the directory on which SublimeLinter-eslint
|
||||
bases the relative path it provides.
|
||||
|
||||
See the SublimeLinter docs on [`chdir`](https://www.sublimelinter.com/en/latest/linter_settings.html#chdir)
|
||||
for more information, in case this does not work with your project.
|
||||
|
||||
If you are not using `.eslintignore`, or don't have a Sublime project file, you can also
|
||||
do the following via a `.sublimelinterrc` file in some ancestor directory of your
|
||||
code:
|
||||
|
||||
```json
|
||||
{
|
||||
"linters": {
|
||||
"eslint": {
|
||||
"args": ["--stdin-filename", "@"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
I also found that I needed to set `rc_search_limit` to `null`, which removes the file
|
||||
hierarchy search limit when looking up the directory tree for `.sublimelinterrc`:
|
||||
|
||||
In Package Settings / SublimeLinter / User Settings:
|
||||
|
||||
```json
|
||||
{
|
||||
"user": {
|
||||
"rc_search_limit": null
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
I believe this defaults to `3`, so you may not need to alter it depending on your
|
||||
project folder max depth.
|
||||
|
||||
[codecov-image]: https://codecov.io/gh/import-js/eslint-plugin-import/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/import-js/eslint-plugin-import/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/import-js/eslint-plugin-import
|
||||
[actions-url]: https://github.com/import-js/eslint-plugin-import
|
||||
11
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/SECURITY.md
generated
vendored
Normal file
11
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/SECURITY.md
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Latest major/minor version is supported only for security updates.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a security vulnerability, please use the
|
||||
[Tidelift security contact](https://tidelift.com/security).
|
||||
Tidelift will coordinate the fix and disclosure.
|
||||
8
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/electron.js
generated
vendored
Normal file
8
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/electron.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* Default settings for Electron applications.
|
||||
*/
|
||||
module.exports = {
|
||||
settings: {
|
||||
'import/core-modules': ['electron'],
|
||||
},
|
||||
};
|
||||
14
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/errors.js
generated
vendored
Normal file
14
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/errors.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* unopinionated config. just the things that are necessarily runtime errors
|
||||
* waiting to happen.
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {
|
||||
plugins: ['import'],
|
||||
rules: { 'import/no-unresolved': 2,
|
||||
'import/named': 2,
|
||||
'import/namespace': 2,
|
||||
'import/default': 2,
|
||||
'import/export': 2,
|
||||
},
|
||||
};
|
||||
14
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/flat/errors.js
generated
vendored
Normal file
14
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/flat/errors.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* unopinionated config. just the things that are necessarily runtime errors
|
||||
* waiting to happen.
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {
|
||||
rules: {
|
||||
'import/no-unresolved': 2,
|
||||
'import/named': 2,
|
||||
'import/namespace': 2,
|
||||
'import/default': 2,
|
||||
'import/export': 2,
|
||||
},
|
||||
};
|
||||
19
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/flat/react.js
generated
vendored
Normal file
19
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/flat/react.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* Adds `.jsx` as an extension, and enables JSX parsing.
|
||||
*
|
||||
* Even if _you_ aren't using JSX (or .jsx) directly, if your dependencies
|
||||
* define jsnext:main and have JSX internally, you may run into problems
|
||||
* if you don't enable these settings at the top level.
|
||||
*/
|
||||
module.exports = {
|
||||
settings: {
|
||||
'import/extensions': ['.js', '.jsx', '.mjs', '.cjs'],
|
||||
},
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
26
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/flat/recommended.js
generated
vendored
Normal file
26
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/flat/recommended.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* The basics.
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {
|
||||
rules: {
|
||||
// analysis/correctness
|
||||
'import/no-unresolved': 'error',
|
||||
'import/named': 'error',
|
||||
'import/namespace': 'error',
|
||||
'import/default': 'error',
|
||||
'import/export': 'error',
|
||||
|
||||
// red flags (thus, warnings)
|
||||
'import/no-named-as-default': 'warn',
|
||||
'import/no-named-as-default-member': 'warn',
|
||||
'import/no-duplicates': 'warn',
|
||||
},
|
||||
|
||||
// need all these for parsing dependencies (even if _your_ code doesn't need
|
||||
// all of them)
|
||||
languageOptions: {
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
},
|
||||
};
|
||||
11
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/flat/warnings.js
generated
vendored
Normal file
11
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/flat/warnings.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* more opinionated config.
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {
|
||||
rules: {
|
||||
'import/no-named-as-default': 1,
|
||||
'import/no-named-as-default-member': 1,
|
||||
'import/no-duplicates': 1,
|
||||
},
|
||||
};
|
||||
13
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/react-native.js
generated
vendored
Normal file
13
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/react-native.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* - adds platform extensions to Node resolver
|
||||
*/
|
||||
module.exports = {
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
node: {
|
||||
// Note: will not complain if only _one_ of these files exists.
|
||||
extensions: ['.js', '.web.js', '.ios.js', '.android.js'],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
16
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/react.js
generated
vendored
Normal file
16
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/react.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Adds `.jsx` as an extension, and enables JSX parsing.
|
||||
*
|
||||
* Even if _you_ aren't using JSX (or .jsx) directly, if your dependencies
|
||||
* define jsnext:main and have JSX internally, you may run into problems
|
||||
* if you don't enable these settings at the top level.
|
||||
*/
|
||||
module.exports = {
|
||||
settings: {
|
||||
'import/extensions': ['.js', '.jsx'],
|
||||
},
|
||||
|
||||
parserOptions: {
|
||||
ecmaFeatures: { jsx: true },
|
||||
},
|
||||
};
|
||||
28
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/recommended.js
generated
vendored
Normal file
28
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/recommended.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* The basics.
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {
|
||||
plugins: ['import'],
|
||||
|
||||
rules: {
|
||||
// analysis/correctness
|
||||
'import/no-unresolved': 'error',
|
||||
'import/named': 'error',
|
||||
'import/namespace': 'error',
|
||||
'import/default': 'error',
|
||||
'import/export': 'error',
|
||||
|
||||
// red flags (thus, warnings)
|
||||
'import/no-named-as-default': 'warn',
|
||||
'import/no-named-as-default-member': 'warn',
|
||||
'import/no-duplicates': 'warn',
|
||||
},
|
||||
|
||||
// need all these for parsing dependencies (even if _your_ code doesn't need
|
||||
// all of them)
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 2018,
|
||||
},
|
||||
};
|
||||
12
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/stage-0.js
generated
vendored
Normal file
12
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/stage-0.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* Rules in progress.
|
||||
*
|
||||
* Do not expect these to adhere to semver across releases.
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {
|
||||
plugins: ['import'],
|
||||
rules: {
|
||||
'import/no-deprecated': 1,
|
||||
},
|
||||
};
|
||||
34
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/typescript.js
generated
vendored
Normal file
34
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/typescript.js
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/**
|
||||
* This config:
|
||||
* 1) adds `.jsx`, `.ts`, `.cts`, `.mts`, and `.tsx` as an extension
|
||||
* 2) enables JSX/TSX parsing
|
||||
*/
|
||||
|
||||
// Omit `.d.ts` because 1) TypeScript compilation already confirms that
|
||||
// types are resolved, and 2) it would mask an unresolved
|
||||
// `.ts`/`.tsx`/`.js`/`.jsx` implementation.
|
||||
const typeScriptExtensions = ['.ts', '.cts', '.mts', '.tsx'];
|
||||
|
||||
const allExtensions = [...typeScriptExtensions, '.js', '.jsx', '.mjs', '.cjs'];
|
||||
|
||||
module.exports = {
|
||||
settings: {
|
||||
'import/extensions': allExtensions,
|
||||
'import/external-module-folders': ['node_modules', 'node_modules/@types'],
|
||||
'import/parsers': {
|
||||
'@typescript-eslint/parser': typeScriptExtensions,
|
||||
},
|
||||
'import/resolver': {
|
||||
node: {
|
||||
extensions: allExtensions,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
rules: {
|
||||
// analysis/correctness
|
||||
|
||||
// TypeScript compilation already ensures that named imports exist in the referenced module
|
||||
'import/named': 'off',
|
||||
},
|
||||
};
|
||||
12
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/warnings.js
generated
vendored
Normal file
12
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/config/warnings.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* more opinionated config.
|
||||
* @type {Object}
|
||||
*/
|
||||
module.exports = {
|
||||
plugins: ['import'],
|
||||
rules: {
|
||||
'import/no-named-as-default': 1,
|
||||
'import/no-named-as-default-member': 1,
|
||||
'import/no-duplicates': 1,
|
||||
},
|
||||
};
|
||||
91
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md
generated
vendored
Normal file
91
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md
generated
vendored
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
# import/consistent-type-specifier-style
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
In both Flow and TypeScript you can mark an import as a type-only import by adding a "kind" marker to the import. Both languages support two positions for marker.
|
||||
|
||||
**At the top-level** which marks all names in the import as type-only and applies to named, default, and namespace (for TypeScript) specifiers:
|
||||
|
||||
```ts
|
||||
import type Foo from 'Foo';
|
||||
import type {Bar} from 'Bar';
|
||||
// ts only
|
||||
import type * as Bam from 'Bam';
|
||||
// flow only
|
||||
import typeof Baz from 'Baz';
|
||||
```
|
||||
|
||||
**Inline** with to the named import, which marks just the specific name in the import as type-only. An inline specifier is only valid for named specifiers, and not for default or namespace specifiers:
|
||||
|
||||
```ts
|
||||
import {type Foo} from 'Foo';
|
||||
// flow only
|
||||
import {typeof Bar} from 'Bar';
|
||||
```
|
||||
|
||||
## Rule Details
|
||||
|
||||
This rule either enforces or bans the use of inline type-only markers for named imports.
|
||||
|
||||
This rule includes a fixer that will automatically convert your specifiers to the correct form - however the fixer will not respect your preferences around de-duplicating imports. If this is important to you, consider using the [`import/no-duplicates`] rule.
|
||||
|
||||
[`import/no-duplicates`]: ./no-duplicates.md
|
||||
|
||||
## Options
|
||||
|
||||
The rule accepts a single string option which may be one of:
|
||||
|
||||
- `'prefer-inline'` - enforces that named type-only specifiers are only ever written with an inline marker; and never as part of a top-level, type-only import.
|
||||
- `'prefer-top-level'` - enforces that named type-only specifiers only ever written as part of a top-level, type-only import; and never with an inline marker.
|
||||
|
||||
By default the rule will use the `prefer-inline` option.
|
||||
|
||||
## Examples
|
||||
|
||||
### `prefer-top-level`
|
||||
|
||||
❌ Invalid with `["error", "prefer-top-level"]`
|
||||
|
||||
```ts
|
||||
import {type Foo} from 'Foo';
|
||||
import Foo, {type Bar} from 'Foo';
|
||||
// flow only
|
||||
import {typeof Foo} from 'Foo';
|
||||
```
|
||||
|
||||
✅ Valid with `["error", "prefer-top-level"]`
|
||||
|
||||
```ts
|
||||
import type {Foo} from 'Foo';
|
||||
import type Foo, {Bar} from 'Foo';
|
||||
// flow only
|
||||
import typeof {Foo} from 'Foo';
|
||||
```
|
||||
|
||||
### `prefer-inline`
|
||||
|
||||
❌ Invalid with `["error", "prefer-inline"]`
|
||||
|
||||
```ts
|
||||
import type {Foo} from 'Foo';
|
||||
import type Foo, {Bar} from 'Foo';
|
||||
// flow only
|
||||
import typeof {Foo} from 'Foo';
|
||||
```
|
||||
|
||||
✅ Valid with `["error", "prefer-inline"]`
|
||||
|
||||
```ts
|
||||
import {type Foo} from 'Foo';
|
||||
import Foo, {type Bar} from 'Foo';
|
||||
// flow only
|
||||
import {typeof Foo} from 'Foo';
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you aren't using Flow or TypeScript 4.5+, then this rule does not apply and need not be used.
|
||||
|
||||
If you don't care about, and don't want to standardize how named specifiers are imported then you should not use this rule.
|
||||
72
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/default.md
generated
vendored
Normal file
72
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/default.md
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# import/default
|
||||
|
||||
💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
If a default import is requested, this rule will report if there is no default
|
||||
export in the imported module.
|
||||
|
||||
For [ES7], reports if a default is named and exported but is not found in the
|
||||
referenced module.
|
||||
|
||||
Note: for packages, the plugin will find exported names
|
||||
from [`jsnext:main`], if present in `package.json`.
|
||||
Redux's npm module includes this key, and thereby is lintable, for example.
|
||||
|
||||
A module path that is [ignored] or not [unambiguously an ES module] will not be reported when imported.
|
||||
|
||||
[ignored]: ../README.md#importignore
|
||||
[unambiguously an ES module]: https://github.com/bmeck/UnambiguousJavaScriptGrammar
|
||||
|
||||
## Rule Details
|
||||
|
||||
Given:
|
||||
|
||||
```js
|
||||
// ./foo.js
|
||||
export default function () { return 42 }
|
||||
|
||||
// ./bar.js
|
||||
export function bar() { return null }
|
||||
|
||||
// ./baz.js
|
||||
module.exports = function () { /* ... */ }
|
||||
|
||||
// node_modules/some-module/index.js
|
||||
exports.sharedFunction = function shared() { /* ... */ }
|
||||
```
|
||||
|
||||
The following is considered valid:
|
||||
|
||||
```js
|
||||
import foo from './foo'
|
||||
|
||||
// assuming 'node_modules' are ignored (true by default)
|
||||
import someModule from 'some-module'
|
||||
```
|
||||
|
||||
...and the following cases are reported:
|
||||
|
||||
```js
|
||||
import bar from './bar' // no default export found in ./bar
|
||||
import baz from './baz' // no default export found in ./baz
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you are using CommonJS and/or modifying the exported namespace of any module at
|
||||
runtime, you will likely see false positives with this rule.
|
||||
|
||||
This rule currently does not interpret `module.exports = ...` as a `default` export,
|
||||
either, so such a situation will be reported in the importing module.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- Lee Byron's [ES7] export proposal
|
||||
- [`import/ignore`] setting
|
||||
- [`jsnext:main`] (Rollup)
|
||||
|
||||
[ES7]: https://github.com/leebyron/ecmascript-more-export-from
|
||||
[`import/ignore`]: ../../README.md#importignore
|
||||
[`jsnext:main`]: https://github.com/rollup/rollup/wiki/jsnext:main
|
||||
134
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md
generated
vendored
Normal file
134
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md
generated
vendored
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
# import/dynamic-import-chunkname
|
||||
|
||||
💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
This rule reports any dynamic imports without a webpackChunkName specified in a leading block comment in the proper format.
|
||||
|
||||
This rule enforces naming of webpack chunks in dynamic imports. When you don't explicitly name chunks, webpack will autogenerate chunk names that are not consistent across builds, which prevents long-term browser caching.
|
||||
|
||||
## Rule Details
|
||||
|
||||
This rule runs against `import()` by default, but can be configured to also run against an alternative dynamic-import function, e.g. 'dynamicImport.'
|
||||
You can also configure the regex format you'd like to accept for the webpackChunkName - for example, if we don't want the number 6 to show up in our chunk names:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"dynamic-import-chunkname": [2, {
|
||||
importFunctions: ["dynamicImport"],
|
||||
webpackChunknameFormat: "[a-zA-Z0-57-9-/_]+",
|
||||
allowEmpty: false
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
### invalid
|
||||
|
||||
The following patterns are invalid:
|
||||
|
||||
```javascript
|
||||
// no leading comment
|
||||
import('someModule');
|
||||
|
||||
// incorrectly formatted comment
|
||||
import(
|
||||
/*webpackChunkName:"someModule"*/
|
||||
'someModule',
|
||||
);
|
||||
import(
|
||||
/* webpackChunkName : "someModule" */
|
||||
'someModule',
|
||||
);
|
||||
|
||||
// chunkname contains a 6 (forbidden by rule config)
|
||||
import(
|
||||
/* webpackChunkName: "someModule6" */
|
||||
'someModule',
|
||||
);
|
||||
|
||||
// invalid syntax for webpack comment
|
||||
import(
|
||||
/* totally not webpackChunkName: "someModule" */
|
||||
'someModule',
|
||||
);
|
||||
|
||||
// single-line comment, not a block-style comment
|
||||
import(
|
||||
// webpackChunkName: "someModule"
|
||||
'someModule',
|
||||
);
|
||||
|
||||
// chunk names are disallowed when eager mode is set
|
||||
import(
|
||||
/* webpackMode: "eager" */
|
||||
/* webpackChunkName: "someModule" */
|
||||
'someModule',
|
||||
)
|
||||
```
|
||||
|
||||
### valid
|
||||
|
||||
The following patterns are valid:
|
||||
|
||||
```javascript
|
||||
import(
|
||||
/* webpackChunkName: "someModule" */
|
||||
'someModule',
|
||||
);
|
||||
import(
|
||||
/* webpackChunkName: "someOtherModule12345789" */
|
||||
'someModule',
|
||||
);
|
||||
import(
|
||||
/* webpackChunkName: "someModule" */
|
||||
/* webpackPrefetch: true */
|
||||
'someModule',
|
||||
);
|
||||
import(
|
||||
/* webpackChunkName: "someModule", webpackPrefetch: true */
|
||||
'someModule',
|
||||
);
|
||||
|
||||
// using single quotes instead of double quotes
|
||||
import(
|
||||
/* webpackChunkName: 'someModule' */
|
||||
'someModule',
|
||||
);
|
||||
```
|
||||
|
||||
### `allowEmpty: true`
|
||||
|
||||
If you want to allow dynamic imports without a webpackChunkName, you can set `allowEmpty: true` in the rule config. This will allow dynamic imports without a leading comment, or with a leading comment that does not contain a webpackChunkName.
|
||||
|
||||
Given `{ "allowEmpty": true }`:
|
||||
|
||||
<!-- markdownlint-disable-next-line MD024 -- duplicate header -->
|
||||
### valid
|
||||
|
||||
The following patterns are valid:
|
||||
|
||||
```javascript
|
||||
import('someModule');
|
||||
|
||||
import(
|
||||
/* webpackChunkName: "someModule" */
|
||||
'someModule',
|
||||
);
|
||||
```
|
||||
<!-- markdownlint-disable-next-line MD024 -- duplicate header -->
|
||||
### invalid
|
||||
|
||||
The following patterns are invalid:
|
||||
|
||||
```javascript
|
||||
// incorrectly formatted comment
|
||||
import(
|
||||
/*webpackChunkName:"someModule"*/
|
||||
'someModule',
|
||||
);
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you don't care that webpack will autogenerate chunk names and may blow up browser caches and bundle size reports.
|
||||
37
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/export.md
generated
vendored
Normal file
37
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/export.md
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# import/export
|
||||
|
||||
💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports funny business with exports, like repeated exports of names or defaults.
|
||||
|
||||
## Rule Details
|
||||
|
||||
```js
|
||||
export default class MyClass { /*...*/ } // Multiple default exports.
|
||||
|
||||
function makeClass() { return new MyClass(...arguments) }
|
||||
|
||||
export default makeClass // Multiple default exports.
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```js
|
||||
export const foo = function () { /*...*/ } // Multiple exports of name 'foo'.
|
||||
|
||||
function bar() { /*...*/ }
|
||||
export { bar as foo } // Multiple exports of name 'foo'.
|
||||
```
|
||||
|
||||
In the case of named/default re-export, all `n` re-exports will be reported,
|
||||
as at least `n-1` of them are clearly mistakes, but it is not clear which one
|
||||
(if any) is intended. Could be the result of copy/paste, code duplication with
|
||||
intent to rename, etc.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- Lee Byron's [ES7] export proposal
|
||||
|
||||
[ES7]: https://github.com/leebyron/ecmascript-more-export-from
|
||||
51
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/exports-last.md
generated
vendored
Normal file
51
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/exports-last.md
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# import/exports-last
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
This rule enforces that all exports are declared at the bottom of the file. This rule will report any export declarations that comes before any non-export statements.
|
||||
|
||||
## This will be reported
|
||||
|
||||
```JS
|
||||
|
||||
const bool = true
|
||||
|
||||
export default bool
|
||||
|
||||
const str = 'foo'
|
||||
|
||||
```
|
||||
|
||||
```JS
|
||||
|
||||
export const bool = true
|
||||
|
||||
const str = 'foo'
|
||||
|
||||
```
|
||||
|
||||
## This will not be reported
|
||||
|
||||
```JS
|
||||
const arr = ['bar']
|
||||
|
||||
export const bool = true
|
||||
|
||||
export default bool
|
||||
|
||||
export function func() {
|
||||
console.log('Hello World 🌍')
|
||||
}
|
||||
|
||||
export const str = 'foo'
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you don't mind exports being sprinkled throughout a file, you may not want to enable this rule.
|
||||
|
||||
### ES6 exports only
|
||||
|
||||
The exports-last rule is currently only working on ES6 exports. You may not want to enable this rule if you're using CommonJS exports.
|
||||
|
||||
If you need CommonJS support feel free to open an issue or create a PR.
|
||||
192
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/extensions.md
generated
vendored
Normal file
192
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/extensions.md
generated
vendored
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
# import/extensions
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Some file resolve algorithms allow you to omit the file extension within the import source path. For example the `node` resolver (which does not yet support ESM/`import`) can resolve `./foo/bar` to the absolute path `/User/someone/foo/bar.js` because the `.js` extension is resolved automatically by default in CJS. Depending on the resolver you can configure more extensions to get resolved automatically.
|
||||
|
||||
In order to provide a consistent use of file extensions across your code base, this rule can enforce or disallow the use of certain file extensions.
|
||||
|
||||
## Rule Details
|
||||
|
||||
This rule either takes one string option, one object option, or a string and an object option. If it is the string `"never"` (the default value), then the rule forbids the use for any extension. If it is the string `"always"`, then the rule enforces the use of extensions for all import statements. If it is the string `"ignorePackages"`, then the rule enforces the use of extensions for all import statements except package imports.
|
||||
|
||||
```json
|
||||
"import/extensions": [<severity>, "never" | "always" | "ignorePackages"]
|
||||
```
|
||||
|
||||
By providing an object you can configure each extension separately.
|
||||
|
||||
```json
|
||||
"import/extensions": [<severity>, {
|
||||
<extension>: "never" | "always" | "ignorePackages"
|
||||
}]
|
||||
```
|
||||
|
||||
For example `{ "js": "always", "json": "never" }` would always enforce the use of the `.js` extension but never allow the use of the `.json` extension.
|
||||
|
||||
By providing both a string and an object, the string will set the default setting for all extensions, and the object can be used to set granular overrides for specific extensions.
|
||||
|
||||
```json
|
||||
"import/extensions": [
|
||||
<severity>,
|
||||
"never" | "always" | "ignorePackages",
|
||||
{
|
||||
<extension>: "never" | "always" | "ignorePackages"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
For example, `["error", "never", { "svg": "always" }]` would require that all extensions are omitted, except for "svg".
|
||||
|
||||
`ignorePackages` can be set as a separate boolean option like this:
|
||||
|
||||
```json
|
||||
"import/extensions": [
|
||||
<severity>,
|
||||
"never" | "always" | "ignorePackages",
|
||||
{
|
||||
ignorePackages: true | false,
|
||||
pattern: {
|
||||
<extension>: "never" | "always" | "ignorePackages"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
In that case, if you still want to specify extensions, you can do so inside the **pattern** property.
|
||||
Default value of `ignorePackages` is `false`.
|
||||
|
||||
By default, `import type` and `export type` style imports/exports are ignored. If you want to check them as well, you can set the `checkTypeImports` option to `true`.
|
||||
|
||||
### Exception
|
||||
|
||||
When disallowing the use of certain extensions this rule makes an exception and allows the use of extension when the file would not be resolvable without extension.
|
||||
|
||||
For example, given the following folder structure:
|
||||
|
||||
```pt
|
||||
├── foo
|
||||
│ ├── bar.js
|
||||
│ ├── bar.json
|
||||
```
|
||||
|
||||
and this import statement:
|
||||
|
||||
```js
|
||||
import bar from './foo/bar.json';
|
||||
```
|
||||
|
||||
then the extension can’t be omitted because it would then resolve to `./foo/bar.js`.
|
||||
|
||||
### Examples
|
||||
|
||||
The following patterns are considered problems when configuration set to "never":
|
||||
|
||||
```js
|
||||
import foo from './foo.js';
|
||||
|
||||
import bar from './bar.json';
|
||||
|
||||
import Component from './Component.jsx';
|
||||
|
||||
import express from 'express/index.js';
|
||||
```
|
||||
|
||||
The following patterns are not considered problems when configuration set to "never":
|
||||
|
||||
```js
|
||||
import foo from './foo';
|
||||
|
||||
import bar from './bar';
|
||||
|
||||
import Component from './Component';
|
||||
|
||||
import express from 'express/index';
|
||||
|
||||
import * as path from 'path';
|
||||
```
|
||||
|
||||
The following patterns are considered problems when the configuration is set to "never" and the option "checkTypeImports" is set to `true`:
|
||||
|
||||
```js
|
||||
import type { Foo } from './foo.ts';
|
||||
|
||||
export type { Foo } from './foo.ts';
|
||||
```
|
||||
|
||||
The following patterns are considered problems when configuration set to "always":
|
||||
|
||||
```js
|
||||
import foo from './foo';
|
||||
|
||||
import bar from './bar';
|
||||
|
||||
import Component from './Component';
|
||||
|
||||
import foo from '@/foo';
|
||||
```
|
||||
|
||||
The following patterns are not considered problems when configuration set to "always":
|
||||
|
||||
```js
|
||||
import foo from './foo.js';
|
||||
|
||||
import bar from './bar.json';
|
||||
|
||||
import Component from './Component.jsx';
|
||||
|
||||
import * as path from 'path';
|
||||
|
||||
import foo from '@/foo.js';
|
||||
```
|
||||
|
||||
The following patterns are considered problems when configuration set to "ignorePackages":
|
||||
|
||||
```js
|
||||
import foo from './foo';
|
||||
|
||||
import bar from './bar';
|
||||
|
||||
import Component from './Component';
|
||||
|
||||
```
|
||||
|
||||
The following patterns are not considered problems when configuration set to "ignorePackages":
|
||||
|
||||
```js
|
||||
import foo from './foo.js';
|
||||
|
||||
import bar from './bar.json';
|
||||
|
||||
import Component from './Component.jsx';
|
||||
|
||||
import express from 'express';
|
||||
|
||||
import foo from '@/foo'
|
||||
```
|
||||
|
||||
The following patterns are not considered problems when configuration set to `['error', 'always', {ignorePackages: true} ]`:
|
||||
|
||||
```js
|
||||
import Component from './Component.jsx';
|
||||
|
||||
import baz from 'foo/baz.js';
|
||||
|
||||
import express from 'express';
|
||||
|
||||
import foo from '@/foo';
|
||||
```
|
||||
|
||||
The following patterns are considered problems when the configuration is set to "always" and the option "checkTypeImports" is set to `true`:
|
||||
|
||||
```js
|
||||
import type { Foo } from './foo';
|
||||
|
||||
export type { Foo } from './foo';
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you are not concerned about a consistent usage of file extension.
|
||||
|
||||
In the future, when this rule supports native node ESM resolution, and the plugin is configured to use native rather than transpiled ESM (a config option that is not yet available) - setting this to `always` will have no effect.
|
||||
75
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/first.md
generated
vendored
Normal file
75
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/first.md
generated
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
# import/first
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
This rule reports any imports that come after non-import
|
||||
statements.
|
||||
|
||||
## Rule Details
|
||||
|
||||
```js
|
||||
import foo from './foo'
|
||||
|
||||
// some module-level initializer
|
||||
initWith(foo)
|
||||
|
||||
import bar from './bar' // <- reported
|
||||
```
|
||||
|
||||
Providing `absolute-first` as an option will report any absolute imports (i.e.
|
||||
packages) that come after any relative imports:
|
||||
|
||||
```js
|
||||
import foo from 'foo'
|
||||
import bar from './bar'
|
||||
|
||||
import * as _ from 'lodash' // <- reported
|
||||
```
|
||||
|
||||
If you really want import type ordering, check out [`import/order`].
|
||||
|
||||
Notably, `import`s are hoisted, which means the imported modules will be evaluated
|
||||
before any of the statements interspersed between them. Keeping all `import`s together
|
||||
at the top of the file may prevent surprises resulting from this part of the spec.
|
||||
|
||||
### On directives
|
||||
|
||||
Directives are allowed as long as they occur strictly before any `import` declarations,
|
||||
as follows:
|
||||
|
||||
```js
|
||||
'use super-mega-strict'
|
||||
|
||||
import { suchFoo } from 'lame-fake-module-name' // no report here
|
||||
```
|
||||
|
||||
A directive in this case is assumed to be a single statement that contains only
|
||||
a literal string-valued expression.
|
||||
|
||||
`'use strict'` would be a good example, except that [modules are always in strict
|
||||
mode](https://262.ecma-international.org/6.0/#sec-strict-mode-code) so it would be surprising to see a `'use strict'` sharing a file with `import`s and
|
||||
`export`s.
|
||||
|
||||
Given that, see [#255] for the reasoning.
|
||||
|
||||
### With Fixer
|
||||
|
||||
This rule contains a fixer to reorder in-body import to top, the following criteria applied:
|
||||
|
||||
1. Never re-order relative to each other, even if `absolute-first` is set.
|
||||
2. If an import creates an identifier, and that identifier is referenced at module level *before* the import itself, that won't be re-ordered.
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you don't mind imports being sprinkled throughout, you may not want to
|
||||
enable this rule.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- [`import/order`]: a major step up from `absolute-first`
|
||||
- Issue [#255]
|
||||
|
||||
[`import/order`]: ./order.md
|
||||
[#255]: https://github.com/import-js/eslint-plugin-import/issues/255
|
||||
118
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/group-exports.md
generated
vendored
Normal file
118
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/group-exports.md
generated
vendored
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
# import/group-exports
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports when named exports are not grouped together in a single `export` declaration or when multiple assignments to CommonJS `module.exports` or `exports` object are present in a single file.
|
||||
|
||||
**Rationale:** An `export` declaration or `module.exports` assignment can appear anywhere in the code. By requiring a single export declaration all your exports will remain at one place, making it easier to see what exports a module provides.
|
||||
|
||||
## Rule Details
|
||||
|
||||
This rule warns whenever a single file contains multiple named export declarations or multiple assignments to `module.exports` (or `exports`).
|
||||
|
||||
### Valid
|
||||
|
||||
```js
|
||||
// A single named export declaration -> ok
|
||||
export const valid = true
|
||||
```
|
||||
|
||||
```js
|
||||
const first = true
|
||||
const second = true
|
||||
|
||||
// A single named export declaration -> ok
|
||||
export {
|
||||
first,
|
||||
second,
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
// Aggregating exports -> ok
|
||||
export { default as module1 } from 'module-1'
|
||||
export { default as module2 } from 'module-2'
|
||||
```
|
||||
|
||||
```js
|
||||
// A single exports assignment -> ok
|
||||
module.exports = {
|
||||
first: true,
|
||||
second: true
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
const first = true
|
||||
const second = true
|
||||
|
||||
// A single exports assignment -> ok
|
||||
module.exports = {
|
||||
first,
|
||||
second,
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
function test() {}
|
||||
test.property = true
|
||||
test.another = true
|
||||
|
||||
// A single exports assignment -> ok
|
||||
module.exports = test
|
||||
```
|
||||
|
||||
```ts
|
||||
const first = true;
|
||||
type firstType = boolean
|
||||
|
||||
// A single named export declaration (type exports handled separately) -> ok
|
||||
export {first}
|
||||
export type {firstType}
|
||||
```
|
||||
|
||||
### Invalid
|
||||
|
||||
```js
|
||||
// Multiple named export statements -> not ok!
|
||||
export const first = true
|
||||
export const second = true
|
||||
```
|
||||
|
||||
```js
|
||||
// Aggregating exports from the same module -> not ok!
|
||||
export { module1 } from 'module-1'
|
||||
export { module2 } from 'module-1'
|
||||
```
|
||||
|
||||
```js
|
||||
// Multiple exports assignments -> not ok!
|
||||
exports.first = true
|
||||
exports.second = true
|
||||
```
|
||||
|
||||
```js
|
||||
// Multiple exports assignments -> not ok!
|
||||
module.exports = {}
|
||||
module.exports.first = true
|
||||
```
|
||||
|
||||
```js
|
||||
// Multiple exports assignments -> not ok!
|
||||
module.exports = () => {}
|
||||
module.exports.first = true
|
||||
module.exports.second = true
|
||||
```
|
||||
|
||||
```ts
|
||||
type firstType = boolean
|
||||
type secondType = any
|
||||
|
||||
// Multiple named type export statements -> not ok!
|
||||
export type {firstType}
|
||||
export type {secondType}
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you do not mind having your exports spread across the file, you can safely turn this rule off.
|
||||
9
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/imports-first.md
generated
vendored
Normal file
9
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/imports-first.md
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# import/imports-first
|
||||
|
||||
❌ This rule is deprecated.
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
This rule was **deprecated** in eslint-plugin-import v2.0.0. Please use the corresponding rule [`first`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/docs/rules/first.md).
|
||||
70
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md
generated
vendored
Normal file
70
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md
generated
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# import/max-dependencies
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Forbid modules to have too many dependencies (`import` or `require` statements).
|
||||
|
||||
This is a useful rule because a module with too many dependencies is a code smell, and usually indicates the module is doing too much and/or should be broken up into smaller modules.
|
||||
|
||||
Importing multiple named exports from a single module will only count once (e.g. `import {x, y, z} from './foo'` will only count as a single dependency).
|
||||
|
||||
## Options
|
||||
|
||||
This rule has the following options, with these defaults:
|
||||
|
||||
```js
|
||||
"import/max-dependencies": ["error", {
|
||||
"max": 10,
|
||||
"ignoreTypeImports": false,
|
||||
}]
|
||||
```
|
||||
|
||||
### `max`
|
||||
|
||||
This option sets the maximum number of dependencies allowed. Anything over will trigger the rule. **Default is 10** if the rule is enabled and no `max` is specified.
|
||||
|
||||
Given a max value of `{"max": 2}`:
|
||||
|
||||
### Fail
|
||||
|
||||
```js
|
||||
import a from './a'; // 1
|
||||
const b = require('./b'); // 2
|
||||
import c from './c'; // 3 - exceeds max!
|
||||
```
|
||||
|
||||
### Pass
|
||||
|
||||
```js
|
||||
import a from './a'; // 1
|
||||
const anotherA = require('./a'); // still 1
|
||||
import {x, y, z} from './foo'; // 2
|
||||
```
|
||||
|
||||
### `ignoreTypeImports`
|
||||
|
||||
Ignores `type` imports. Type imports are a feature released in TypeScript 3.8, you can [read more here](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export). Defaults to `false`.
|
||||
|
||||
Given `{"max": 2, "ignoreTypeImports": true}`:
|
||||
|
||||
<!-- markdownlint-disable-next-line MD024 -- duplicate header -->
|
||||
### Fail
|
||||
|
||||
```ts
|
||||
import a from './a';
|
||||
import b from './b';
|
||||
import c from './c';
|
||||
```
|
||||
|
||||
<!-- markdownlint-disable-next-line MD024 -- duplicate header -->
|
||||
### Pass
|
||||
|
||||
```ts
|
||||
import a from './a';
|
||||
import b from './b';
|
||||
import type c from './c'; // Doesn't count against max
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you don't care how many dependencies a module has.
|
||||
102
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/named.md
generated
vendored
Normal file
102
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/named.md
generated
vendored
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
# import/named
|
||||
|
||||
💼🚫 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`. This rule is _disabled_ in the ⌨️ `typescript` config.
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Verifies that all named imports are part of the set of named exports in the referenced module.
|
||||
|
||||
For `export`, verifies that all named exports exist in the referenced module.
|
||||
|
||||
Note: for packages, the plugin will find exported names
|
||||
from [`jsnext:main`] (deprecated) or `module`, if present in `package.json`.
|
||||
Redux's npm module includes this key, and thereby is lintable, for example.
|
||||
|
||||
A module path that is [ignored] or not [unambiguously an ES module] will not be reported when imported. Note that type imports and exports, as used by [Flow], are always ignored.
|
||||
|
||||
[ignored]: ../../README.md#importignore
|
||||
[unambiguously an ES module]: https://github.com/bmeck/UnambiguousJavaScriptGrammar
|
||||
[Flow]: https://flow.org/
|
||||
|
||||
## Rule Details
|
||||
|
||||
Given:
|
||||
|
||||
```js
|
||||
// ./foo.js
|
||||
export const foo = "I'm so foo"
|
||||
```
|
||||
|
||||
The following is considered valid:
|
||||
|
||||
```js
|
||||
// ./bar.js
|
||||
import { foo } from './foo'
|
||||
|
||||
// ES7 proposal
|
||||
export { foo as bar } from './foo'
|
||||
|
||||
// node_modules without jsnext:main are not analyzed by default
|
||||
// (import/ignore setting)
|
||||
import { SomeNonsenseThatDoesntExist } from 'react'
|
||||
```
|
||||
|
||||
...and the following are reported:
|
||||
|
||||
```js
|
||||
// ./baz.js
|
||||
import { notFoo } from './foo'
|
||||
|
||||
// ES7 proposal
|
||||
export { notFoo as defNotBar } from './foo'
|
||||
|
||||
// will follow 'jsnext:main', if available
|
||||
import { dontCreateStore } from 'redux'
|
||||
```
|
||||
|
||||
### Settings
|
||||
|
||||
[`import/ignore`] can be provided as a setting to ignore certain modules (node_modules,
|
||||
CoffeeScript, CSS if using Webpack, etc.).
|
||||
|
||||
Given:
|
||||
|
||||
```yaml
|
||||
# .eslintrc (YAML)
|
||||
---
|
||||
settings:
|
||||
import/ignore:
|
||||
- node_modules # included by default, but replaced if explicitly configured
|
||||
- *.coffee$ # can't parse CoffeeScript (unless a custom polyglot parser was configured)
|
||||
```
|
||||
|
||||
and
|
||||
|
||||
```coffeescript
|
||||
# ./whatever.coffee
|
||||
exports.whatever = (foo) -> console.log foo
|
||||
```
|
||||
|
||||
then the following is not reported:
|
||||
|
||||
```js
|
||||
// ./foo.js
|
||||
|
||||
// can't be analyzed, and ignored, so not reported
|
||||
import { notWhatever } from './whatever'
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you are using CommonJS and/or modifying the exported namespace of any module at
|
||||
runtime, you will likely see false positives with this rule.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- [`import/ignore`] setting
|
||||
- [`jsnext:main`] deprecation
|
||||
- [`pkg.module`] (Rollup)
|
||||
|
||||
[`jsnext:main`]: https://github.com/jsforum/jsforum/issues/5
|
||||
[`pkg.module`]: https://github.com/rollup/rollup/wiki/pkg.module
|
||||
[`import/ignore`]: ../../README.md#importignore
|
||||
106
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/namespace.md
generated
vendored
Normal file
106
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/namespace.md
generated
vendored
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
# import/namespace
|
||||
|
||||
💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Enforces names exist at the time they are dereferenced, when imported as a full namespace (i.e. `import * as foo from './foo'; foo.bar();` will report if `bar` is not exported by `./foo`.).
|
||||
|
||||
Will report at the import declaration if there are _no_ exported names found.
|
||||
|
||||
Also, will report for computed references (i.e. `foo["bar"]()`).
|
||||
|
||||
Reports on assignment to a member of an imported namespace.
|
||||
|
||||
Note: for packages, the plugin will find exported names
|
||||
from [`jsnext:main`], if present in `package.json`.
|
||||
Redux's npm module includes this key, and thereby is lintable, for example.
|
||||
|
||||
A module path that is [ignored] or not [unambiguously an ES module] will not be reported when imported.
|
||||
|
||||
[ignored]: ../README.md#importignore
|
||||
[unambiguously an ES module]: https://github.com/bmeck/UnambiguousJavaScriptGrammar
|
||||
|
||||
## Rule Details
|
||||
|
||||
Currently, this rule does not check for possible
|
||||
redefinition of the namespace in an intermediate scope. Adherence to the ESLint
|
||||
`no-shadow` rule for namespaces will prevent this from being a problem.
|
||||
|
||||
For [ES7], reports if an exported namespace would be empty (no names exported from the referenced module.)
|
||||
|
||||
Given:
|
||||
|
||||
```js
|
||||
// @module ./named-exports
|
||||
export const a = 1
|
||||
const b = 2
|
||||
export { b }
|
||||
|
||||
const c = 3
|
||||
export { c as d }
|
||||
|
||||
export class ExportedClass { }
|
||||
|
||||
// ES7
|
||||
export * as deep from './deep'
|
||||
```
|
||||
|
||||
and:
|
||||
|
||||
```js
|
||||
// @module ./deep
|
||||
export const e = "MC2"
|
||||
```
|
||||
|
||||
See what is valid and reported:
|
||||
|
||||
```js
|
||||
// @module ./foo
|
||||
import * as names from './named-exports'
|
||||
|
||||
function great() {
|
||||
return names.a + names.b // so great https://youtu.be/ei7mb8UxEl8
|
||||
}
|
||||
|
||||
function notGreat() {
|
||||
doSomethingWith(names.c) // Reported: 'c' not found in imported namespace 'names'.
|
||||
|
||||
const { a, b, c } = names // also reported, only for 'c'
|
||||
}
|
||||
|
||||
// also tunnels through re-exported namespaces!
|
||||
function deepTrouble() {
|
||||
doSomethingWith(names.deep.e) // fine
|
||||
doSomethingWith(names.deep.f) // Reported: 'f' not found in deeply imported namespace 'names.deep'.
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
#### `allowComputed`
|
||||
|
||||
Defaults to `false`. When false, will report the following:
|
||||
|
||||
```js
|
||||
/*eslint import/namespace: [2, { allowComputed: false }]*/
|
||||
import * as a from './a'
|
||||
|
||||
function f(x) {
|
||||
return a[x] // Unable to validate computed reference to imported namespace 'a'.
|
||||
}
|
||||
```
|
||||
|
||||
When set to `true`, the above computed namespace member reference is allowed, but
|
||||
still can't be statically analyzed any further.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- Lee Byron's [ES7] export proposal
|
||||
- [`import/ignore`] setting
|
||||
- [`jsnext:main`](Rollup)
|
||||
|
||||
[ES7]: https://github.com/leebyron/ecmascript-more-export-from
|
||||
[`import/ignore`]: ../../README.md#importignore
|
||||
[`jsnext:main`]: https://github.com/rollup/rollup/wiki/jsnext:main
|
||||
167
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md
generated
vendored
Normal file
167
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md
generated
vendored
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
# import/newline-after-import
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Enforces having one or more empty lines after the last top-level import statement or require call.
|
||||
|
||||
## Rule Details
|
||||
|
||||
This rule supports the following options:
|
||||
|
||||
- `count` which sets the number of newlines that are enforced after the last top-level import statement or require call. This option defaults to `1`.
|
||||
|
||||
- `exactCount` which enforce the exact numbers of newlines that is mentioned in `count`. This option defaults to `false`.
|
||||
|
||||
- `considerComments` which enforces the rule on comments after the last import-statement as well when set to true. This option defaults to `false`.
|
||||
|
||||
Valid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
import { bar } from 'bar-lib';
|
||||
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
```js
|
||||
const FOO = require('./foo');
|
||||
const BAR = require('./bar');
|
||||
|
||||
const BAZ = 1;
|
||||
```
|
||||
|
||||
Invalid:
|
||||
|
||||
```js
|
||||
import * as foo from 'foo'
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
```js
|
||||
import * as foo from 'foo';
|
||||
const FOO = 'BAR';
|
||||
|
||||
import { bar } from 'bar-lib';
|
||||
```
|
||||
|
||||
```js
|
||||
const FOO = require('./foo');
|
||||
const BAZ = 1;
|
||||
const BAR = require('./bar');
|
||||
```
|
||||
|
||||
With `count` set to `2` this will be considered valid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
|
||||
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
|
||||
|
||||
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
With `count` set to `2` these will be considered invalid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
With `count` set to `2` and `exactCount` set to `true` this will be considered valid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
|
||||
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
With `count` set to `2` and `exactCount` set to `true` these will be considered invalid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
|
||||
|
||||
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
```js
|
||||
import defaultExport from './foo';
|
||||
|
||||
|
||||
|
||||
|
||||
const FOO = 'BAR';
|
||||
```
|
||||
|
||||
With `considerComments` set to `false` this will be considered valid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo'
|
||||
// some comment here.
|
||||
const FOO = 'BAR'
|
||||
```
|
||||
|
||||
With `considerComments` set to `true` this will be considered valid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo'
|
||||
|
||||
// some comment here.
|
||||
const FOO = 'BAR'
|
||||
```
|
||||
|
||||
With `considerComments` set to `true` this will be considered invalid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo'
|
||||
// some comment here.
|
||||
const FOO = 'BAR'
|
||||
```
|
||||
|
||||
## Example options usage
|
||||
|
||||
```json
|
||||
{
|
||||
"rules": {
|
||||
"import/newline-after-import": ["error", { "count": 2 }]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you like to visually group module imports with its usage, you don't want to use this rule.
|
||||
54
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md
generated
vendored
Normal file
54
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# import/no-absolute-path
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Node.js allows the import of modules using an absolute path such as `/home/xyz/file.js`. That is a bad practice as it ties the code using it to your computer, and therefore makes it unusable in packages distributed on `npm` for instance.
|
||||
|
||||
This rule forbids the import of modules using absolute paths.
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Fail
|
||||
|
||||
```js
|
||||
import f from '/foo';
|
||||
import f from '/some/path';
|
||||
|
||||
var f = require('/foo');
|
||||
var f = require('/some/path');
|
||||
```
|
||||
|
||||
### Pass
|
||||
|
||||
```js
|
||||
import _ from 'lodash';
|
||||
import foo from 'foo';
|
||||
import foo from './foo';
|
||||
|
||||
var _ = require('lodash');
|
||||
var foo = require('foo');
|
||||
var foo = require('./foo');
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
By default, only ES6 imports and CommonJS `require` calls will have this rule enforced.
|
||||
|
||||
You may provide an options object providing true/false for any of
|
||||
|
||||
- `esmodule`: defaults to `true`
|
||||
- `commonjs`: defaults to `true`
|
||||
- `amd`: defaults to `false`
|
||||
|
||||
If `{ amd: true }` is provided, dependency paths for AMD-style `define` and `require`
|
||||
calls will be resolved:
|
||||
|
||||
```js
|
||||
/*eslint import/no-absolute-path: [2, { commonjs: false, amd: true }]*/
|
||||
define(['/foo'], function (foo) { /*...*/ }) // reported
|
||||
require(['/foo'], function (foo) { /*...*/ }) // reported
|
||||
|
||||
const foo = require('/foo') // ignored because of explicit `commonjs: false`
|
||||
```
|
||||
37
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-amd.md
generated
vendored
Normal file
37
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-amd.md
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# import/no-amd
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports `require([array], ...)` and `define([array], ...)` function calls at the
|
||||
module scope. Will not report if !=2 arguments, or first argument is not a literal array.
|
||||
|
||||
Intended for temporary use when migrating to pure ES6 modules.
|
||||
|
||||
## Rule Details
|
||||
|
||||
This will be reported:
|
||||
|
||||
```js
|
||||
define(["a", "b"], function (a, b) { /* ... */ })
|
||||
|
||||
require(["b", "c"], function (b, c) { /* ... */ })
|
||||
```
|
||||
|
||||
CommonJS `require` is still valid.
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you don't mind mixing module systems (sometimes this is useful), you probably
|
||||
don't want this rule.
|
||||
|
||||
It is also fairly noisy if you have a larger codebase that is being transitioned
|
||||
from AMD to ES6 modules.
|
||||
|
||||
## Contributors
|
||||
|
||||
Special thanks to @xjamundx for donating his no-define rule as a start to this.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- [`no-commonjs`](./no-commonjs.md): report CommonJS `require` and `exports`
|
||||
- Source: <https://github.com/xjamundx/eslint-plugin-modules>
|
||||
83
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md
generated
vendored
Normal file
83
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
# import/no-anonymous-default-export
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports if a module's default export is unnamed. This includes several types of unnamed data types; literals, object expressions, arrays, anonymous functions, arrow functions, and anonymous class declarations.
|
||||
|
||||
Ensuring that default exports are named helps improve the grepability of the codebase by encouraging the re-use of the same identifier for the module's default export at its declaration site and at its import sites.
|
||||
|
||||
## Options
|
||||
|
||||
By default, all types of anonymous default exports are forbidden, but any types can be selectively allowed by toggling them on in the options.
|
||||
|
||||
The complete default configuration looks like this.
|
||||
|
||||
```js
|
||||
"import/no-anonymous-default-export": ["error", {
|
||||
"allowArray": false,
|
||||
"allowArrowFunction": false,
|
||||
"allowAnonymousClass": false,
|
||||
"allowAnonymousFunction": false,
|
||||
"allowCallExpression": true, // The true value here is for backward compatibility
|
||||
"allowNew": false,
|
||||
"allowLiteral": false,
|
||||
"allowObject": false
|
||||
}]
|
||||
```
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Fail
|
||||
|
||||
```js
|
||||
export default []
|
||||
|
||||
export default () => {}
|
||||
|
||||
export default class {}
|
||||
|
||||
export default function () {}
|
||||
|
||||
/* eslint import/no-anonymous-default-export: [2, {"allowCallExpression": false}] */
|
||||
export default foo(bar)
|
||||
|
||||
export default 123
|
||||
|
||||
export default {}
|
||||
|
||||
export default new Foo()
|
||||
```
|
||||
|
||||
### Pass
|
||||
|
||||
```js
|
||||
const foo = 123
|
||||
export default foo
|
||||
|
||||
export default class MyClass() {}
|
||||
|
||||
export default function foo() {}
|
||||
|
||||
/* eslint import/no-anonymous-default-export: [2, {"allowArray": true}] */
|
||||
export default []
|
||||
|
||||
/* eslint import/no-anonymous-default-export: [2, {"allowArrowFunction": true}] */
|
||||
export default () => {}
|
||||
|
||||
/* eslint import/no-anonymous-default-export: [2, {"allowAnonymousClass": true}] */
|
||||
export default class {}
|
||||
|
||||
/* eslint import/no-anonymous-default-export: [2, {"allowAnonymousFunction": true}] */
|
||||
export default function () {}
|
||||
|
||||
export default foo(bar)
|
||||
|
||||
/* eslint import/no-anonymous-default-export: [2, {"allowLiteral": true}] */
|
||||
export default 123
|
||||
|
||||
/* eslint import/no-anonymous-default-export: [2, {"allowObject": true}] */
|
||||
export default {}
|
||||
|
||||
/* eslint import/no-anonymous-default-export: [2, {"allowNew": true}] */
|
||||
export default new Foo()
|
||||
```
|
||||
96
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md
generated
vendored
Normal file
96
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md
generated
vendored
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
# import/no-commonjs
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports `require([string])` function calls. Will not report if >1 argument,
|
||||
or single argument is not a literal string.
|
||||
|
||||
Reports `module.exports` or `exports.*`, also.
|
||||
|
||||
Intended for temporary use when migrating to pure ES6 modules.
|
||||
|
||||
## Rule Details
|
||||
|
||||
This will be reported:
|
||||
|
||||
```js
|
||||
var mod = require('./mod')
|
||||
, common = require('./common')
|
||||
, fs = require('fs')
|
||||
, whateverModule = require('./not-found')
|
||||
|
||||
module.exports = { a: "b" }
|
||||
exports.c = "d"
|
||||
```
|
||||
|
||||
### Allow require
|
||||
|
||||
If `allowRequire` option is set to `true`, `require` calls are valid:
|
||||
|
||||
```js
|
||||
/*eslint no-commonjs: [2, { allowRequire: true }]*/
|
||||
var mod = require('./mod');
|
||||
```
|
||||
|
||||
but `module.exports` is reported as usual.
|
||||
|
||||
### Allow conditional require
|
||||
|
||||
By default, conditional requires are allowed:
|
||||
|
||||
```js
|
||||
var a = b && require("c")
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
require('that-ugly-thing');
|
||||
}
|
||||
|
||||
var fs = null;
|
||||
try {
|
||||
fs = require("fs")
|
||||
} catch (error) {}
|
||||
```
|
||||
|
||||
If the `allowConditionalRequire` option is set to `false`, they will be reported.
|
||||
|
||||
If you don't rely on synchronous module loading, check out [dynamic import](https://github.com/airbnb/babel-plugin-dynamic-import-node).
|
||||
|
||||
### Allow primitive modules
|
||||
|
||||
If `allowPrimitiveModules` option is set to `true`, the following is valid:
|
||||
|
||||
```js
|
||||
/*eslint no-commonjs: [2, { allowPrimitiveModules: true }]*/
|
||||
|
||||
module.exports = "foo"
|
||||
module.exports = function rule(context) { return { /* ... */ } }
|
||||
```
|
||||
|
||||
but this is still reported:
|
||||
|
||||
```js
|
||||
/*eslint no-commonjs: [2, { allowPrimitiveModules: true }]*/
|
||||
|
||||
module.exports = { x: "y" }
|
||||
exports.z = function boop() { /* ... */ }
|
||||
```
|
||||
|
||||
This is useful for things like ESLint rule modules, which must export a function as
|
||||
the module.
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you don't mind mixing module systems (sometimes this is useful), you probably
|
||||
don't want this rule.
|
||||
|
||||
It is also fairly noisy if you have a larger codebase that is being transitioned
|
||||
from CommonJS to ES6 modules.
|
||||
|
||||
## Contributors
|
||||
|
||||
Special thanks to @xjamundx for donating the module.exports and exports.* bits.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- [`no-amd`](./no-amd.md): report on AMD `require`, `define`
|
||||
- Source: <https://github.com/xjamundx/eslint-plugin-modules>
|
||||
119
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-cycle.md
generated
vendored
Normal file
119
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-cycle.md
generated
vendored
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
# import/no-cycle
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Ensures that there is no resolvable path back to this module via its dependencies.
|
||||
|
||||
This includes cycles of depth 1 (imported module imports me) to `"∞"` (or `Infinity`), if the
|
||||
[`maxDepth`](#maxdepth) option is not set.
|
||||
|
||||
```js
|
||||
// dep-b.js
|
||||
import './dep-a.js'
|
||||
|
||||
export function b() { /* ... */ }
|
||||
```
|
||||
|
||||
```js
|
||||
// dep-a.js
|
||||
import { b } from './dep-b.js' // reported: Dependency cycle detected.
|
||||
```
|
||||
|
||||
This rule does _not_ detect imports that resolve directly to the linted module;
|
||||
for that, see [`no-self-import`].
|
||||
|
||||
This rule ignores type-only imports in Flow and TypeScript syntax (`import type` and `import typeof`), which have no runtime effect.
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Options
|
||||
|
||||
By default, this rule only detects cycles for ES6 imports, but see the [`no-unresolved` options](./no-unresolved.md#options) as this rule also supports the same `commonjs` and `amd` flags. However, these flags only impact which import types are _linted_; the
|
||||
import/export infrastructure only registers `import` statements in dependencies, so
|
||||
cycles created by `require` within imported modules may not be detected.
|
||||
|
||||
#### `maxDepth`
|
||||
|
||||
There is a `maxDepth` option available to prevent full expansion of very deep dependency trees:
|
||||
|
||||
```js
|
||||
/*eslint import/no-cycle: [2, { maxDepth: 1 }]*/
|
||||
|
||||
// dep-c.js
|
||||
import './dep-a.js'
|
||||
```
|
||||
|
||||
```js
|
||||
// dep-b.js
|
||||
import './dep-c.js'
|
||||
|
||||
export function b() { /* ... */ }
|
||||
```
|
||||
|
||||
```js
|
||||
// dep-a.js
|
||||
import { b } from './dep-b.js' // not reported as the cycle is at depth 2
|
||||
```
|
||||
|
||||
This is not necessarily recommended, but available as a cost/benefit tradeoff mechanism
|
||||
for reducing total project lint time, if needed.
|
||||
|
||||
#### `ignoreExternal`
|
||||
|
||||
An `ignoreExternal` option is available to prevent the cycle detection to expand to external modules:
|
||||
|
||||
```js
|
||||
/*eslint import/no-cycle: [2, { ignoreExternal: true }]*/
|
||||
|
||||
// dep-a.js
|
||||
import 'module-b/dep-b.js'
|
||||
|
||||
export function a() { /* ... */ }
|
||||
```
|
||||
|
||||
```js
|
||||
// node_modules/module-b/dep-b.js
|
||||
import { a } from './dep-a.js' // not reported as this module is external
|
||||
```
|
||||
|
||||
Its value is `false` by default, but can be set to `true` for reducing total project lint time, if needed.
|
||||
|
||||
#### `allowUnsafeDynamicCyclicDependency`
|
||||
|
||||
This option disable reporting of errors if a cycle is detected with at least one dynamic import.
|
||||
|
||||
```js
|
||||
// bar.js
|
||||
import { foo } from './foo';
|
||||
export const bar = foo;
|
||||
|
||||
// foo.js
|
||||
export const foo = 'Foo';
|
||||
export function getBar() { return import('./bar'); }
|
||||
```
|
||||
|
||||
> Cyclic dependency are **always** a dangerous anti-pattern as discussed extensively in [#2265](https://github.com/import-js/eslint-plugin-import/issues/2265). Please be extra careful about using this option.
|
||||
|
||||
#### `disableScc`
|
||||
|
||||
This option disables a pre-processing step that calculates [Strongly Connected Components](https://en.wikipedia.org/wiki/Strongly_connected_component), which are used for avoiding unnecessary work checking files in different SCCs for cycles.
|
||||
|
||||
However, under some configurations, this pre-processing may be more expensive than the time it saves.
|
||||
|
||||
When this option is `true`, we don't calculate any SCC graph, and check all files for cycles (leading to higher time-complexity). Default is `false`.
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
This rule is comparatively computationally expensive. If you are pressed for lint
|
||||
time, or don't think you have an issue with dependency cycles, you may not want
|
||||
this rule enabled.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- [Original inspiring issue](https://github.com/import-js/eslint-plugin-import/issues/941)
|
||||
- Rule to detect that module imports itself: [`no-self-import`]
|
||||
- [`import/external-module-folders`] setting
|
||||
|
||||
[`no-self-import`]: ./no-self-import.md
|
||||
|
||||
[`import/external-module-folders`]: ../../README.md#importexternal-module-folders
|
||||
65
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-default-export.md
generated
vendored
Normal file
65
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-default-export.md
generated
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# import/no-default-export
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Prohibit default exports. Mostly an inverse of [`prefer-default-export`].
|
||||
|
||||
[`prefer-default-export`]: ./prefer-default-export.md
|
||||
|
||||
## Rule Details
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```javascript
|
||||
// bad1.js
|
||||
|
||||
// There is a default export.
|
||||
export const foo = 'foo';
|
||||
const bar = 'bar';
|
||||
export default 'bar';
|
||||
```
|
||||
|
||||
```javascript
|
||||
// bad2.js
|
||||
|
||||
// There is a default export.
|
||||
const foo = 'foo';
|
||||
export { foo as default }
|
||||
```
|
||||
|
||||
The following patterns are not warnings:
|
||||
|
||||
```javascript
|
||||
// good1.js
|
||||
|
||||
// There is only a single module export and it's a named export.
|
||||
export const foo = 'foo';
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good2.js
|
||||
|
||||
// There is more than one named export in the module.
|
||||
export const foo = 'foo';
|
||||
export const bar = 'bar';
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good3.js
|
||||
|
||||
// There is more than one named export in the module
|
||||
const foo = 'foo';
|
||||
const bar = 'bar';
|
||||
export { foo, bar }
|
||||
```
|
||||
|
||||
```javascript
|
||||
// export-star.js
|
||||
|
||||
// Any batch export will disable this rule. The remote module is not inspected.
|
||||
export * from './other-module'
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you don't care if default imports are used, or if you prefer default imports over named imports.
|
||||
62
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md
generated
vendored
Normal file
62
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md
generated
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# import/no-deprecated
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports use of a deprecated name, as indicated by a JSDoc block with a `@deprecated`
|
||||
tag or TomDoc `Deprecated:` comment.
|
||||
|
||||
using a JSDoc `@deprecated` tag:
|
||||
|
||||
```js
|
||||
// @file: ./answer.js
|
||||
|
||||
/**
|
||||
* this is what you get when you trust a mouse talk show
|
||||
* @deprecated need to restart the experiment
|
||||
* @returns {Number} nonsense
|
||||
*/
|
||||
export function multiply(six, nine) {
|
||||
return 42
|
||||
}
|
||||
```
|
||||
|
||||
will report as such:
|
||||
|
||||
```js
|
||||
import { multiply } from './answer' // Deprecated: need to restart the experiment
|
||||
|
||||
function whatever(y, z) {
|
||||
return multiply(y, z) // Deprecated: need to restart the experiment
|
||||
}
|
||||
```
|
||||
|
||||
or using the TomDoc equivalent:
|
||||
|
||||
```js
|
||||
// Deprecated: This is what you get when you trust a mouse talk show, need to
|
||||
// restart the experiment.
|
||||
//
|
||||
// Returns a Number nonsense
|
||||
export function multiply(six, nine) {
|
||||
return 42
|
||||
}
|
||||
```
|
||||
|
||||
Only JSDoc is enabled by default. Other documentation styles can be enabled with
|
||||
the `import/docstyle` setting.
|
||||
|
||||
```yaml
|
||||
# .eslintrc.yml
|
||||
settings:
|
||||
import/docstyle: ['jsdoc', 'tomdoc']
|
||||
```
|
||||
|
||||
## Worklist
|
||||
|
||||
- [x] report explicit imports on the import node
|
||||
- [x] support namespaces
|
||||
- [x] should bubble up through deep namespaces (#157)
|
||||
- [x] report explicit imports at reference time (at the identifier) similar to namespace
|
||||
- [x] mark module deprecated if file JSDoc has a @deprecated tag?
|
||||
- [ ] don't flag redeclaration of imported, deprecated names
|
||||
- [ ] flag destructuring
|
||||
109
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md
generated
vendored
Normal file
109
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md
generated
vendored
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
# import/no-duplicates
|
||||
|
||||
⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`.
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports if a resolved path is imported more than once.
|
||||
|
||||
ESLint core has a similar rule ([`no-duplicate-imports`](https://eslint.org/docs/rules/no-duplicate-imports)), but this version
|
||||
is different in two key ways:
|
||||
|
||||
1. the paths in the source code don't have to exactly match, they just have to point to the same module on the filesystem. (i.e. `./foo` and `./foo.js`)
|
||||
2. this version distinguishes Flow `type` imports from standard imports. ([#334](https://github.com/import-js/eslint-plugin-import/pull/334))
|
||||
|
||||
## Rule Details
|
||||
|
||||
Valid:
|
||||
|
||||
```js
|
||||
import SomeDefaultClass, * as names from './mod'
|
||||
// Flow `type` import from same module is fine
|
||||
import type SomeType from './mod'
|
||||
```
|
||||
|
||||
...whereas here, both `./mod` imports will be reported:
|
||||
|
||||
```js
|
||||
import SomeDefaultClass from './mod'
|
||||
|
||||
// oops, some other import separated these lines
|
||||
import foo from './some-other-mod'
|
||||
|
||||
import * as names from './mod'
|
||||
|
||||
// will catch this too, assuming it is the same target module
|
||||
import { something } from './mod.js'
|
||||
```
|
||||
|
||||
The motivation is that this is likely a result of two developers importing different
|
||||
names from the same module at different times (and potentially largely different
|
||||
locations in the file.) This rule brings both (or n-many) to attention.
|
||||
|
||||
### Query Strings
|
||||
|
||||
By default, this rule ignores query strings (i.e. paths followed by a question mark), and thus imports from `./mod?a` and `./mod?b` will be considered as duplicates. However you can use the option `considerQueryString` to handle them as different (primarily because browsers will resolve those imports differently).
|
||||
|
||||
Config:
|
||||
|
||||
```json
|
||||
"import/no-duplicates": ["error", {"considerQueryString": true}]
|
||||
```
|
||||
|
||||
And then the following code becomes valid:
|
||||
|
||||
```js
|
||||
import minifiedMod from './mod?minify'
|
||||
import noCommentsMod from './mod?comments=0'
|
||||
import originalMod from './mod'
|
||||
```
|
||||
|
||||
It will still catch duplicates when using the same module and the exact same query string:
|
||||
|
||||
```js
|
||||
import SomeDefaultClass from './mod?minify'
|
||||
|
||||
// This is invalid, assuming `./mod` and `./mod.js` are the same target:
|
||||
import * from './mod.js?minify'
|
||||
```
|
||||
|
||||
### Inline Type imports
|
||||
|
||||
TypeScript 4.5 introduced a new [feature](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5/#type-on-import-names) that allows mixing of named value and type imports. In order to support fixing to an inline type import when duplicate imports are detected, `prefer-inline` can be set to true.
|
||||
|
||||
Config:
|
||||
|
||||
```json
|
||||
"import/no-duplicates": ["error", {"prefer-inline": true}]
|
||||
```
|
||||
|
||||
<!--tabs-->
|
||||
|
||||
❌ Invalid `["error", {"prefer-inline": true}]`
|
||||
|
||||
```js
|
||||
import { AValue, type AType } from './mama-mia'
|
||||
import type { BType } from './mama-mia'
|
||||
|
||||
import { CValue } from './papa-mia'
|
||||
import type { CType } from './papa-mia'
|
||||
```
|
||||
|
||||
✅ Valid with `["error", {"prefer-inline": true}]`
|
||||
|
||||
```js
|
||||
import { AValue, type AType, type BType } from './mama-mia'
|
||||
|
||||
import { CValue, type CType } from './papa-mia'
|
||||
```
|
||||
|
||||
<!--tabs-->
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If the core ESLint version is good enough (i.e. you're _not_ using Flow and you _are_ using [`import/extensions`](./extensions.md)), keep it and don't use this.
|
||||
|
||||
If you like to split up imports across lines or may need to import a default and a namespace,
|
||||
you may not want to enable this rule.
|
||||
25
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md
generated
vendored
Normal file
25
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# import/no-dynamic-require
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
The `require` method from CommonJS is used to import modules from different files. Unlike the ES6 `import` syntax, it can be given expressions that will be resolved at runtime. While this is sometimes necessary and useful, in most cases it isn't. Using expressions (for instance, concatenating a path and variable) as the argument makes it harder for tools to do static code analysis, or to find where in the codebase a module is used.
|
||||
|
||||
This rule forbids every call to `require()` that uses expressions for the module name argument.
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Fail
|
||||
|
||||
```js
|
||||
require(name);
|
||||
require('../' + name);
|
||||
require(`../${name}`);
|
||||
require(name());
|
||||
```
|
||||
|
||||
### Pass
|
||||
|
||||
```js
|
||||
require('../name');
|
||||
require(`../name`);
|
||||
```
|
||||
49
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md
generated
vendored
Normal file
49
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md
generated
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# import/no-empty-named-blocks
|
||||
|
||||
🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports the use of empty named import blocks.
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Valid
|
||||
|
||||
```js
|
||||
import { mod } from 'mod'
|
||||
import Default, { mod } from 'mod'
|
||||
```
|
||||
|
||||
When using typescript
|
||||
|
||||
```js
|
||||
import type { mod } from 'mod'
|
||||
```
|
||||
|
||||
When using flow
|
||||
|
||||
```js
|
||||
import typeof { mod } from 'mod'
|
||||
```
|
||||
|
||||
### Invalid
|
||||
|
||||
```js
|
||||
import {} from 'mod'
|
||||
import Default, {} from 'mod'
|
||||
```
|
||||
|
||||
When using typescript
|
||||
|
||||
```js
|
||||
import type Default, {} from 'mod'
|
||||
import type {} from 'mod'
|
||||
```
|
||||
|
||||
When using flow
|
||||
|
||||
```js
|
||||
import typeof {} from 'mod'
|
||||
import typeof Default, {} from 'mod'
|
||||
```
|
||||
139
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md
generated
vendored
Normal file
139
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md
generated
vendored
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
# import/no-extraneous-dependencies
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Forbid the import of external modules that are not declared in the `package.json`'s `dependencies`, `devDependencies`, `optionalDependencies`, `peerDependencies`, or `bundledDependencies`.
|
||||
The closest parent `package.json` will be used. If no `package.json` is found, the rule will not lint anything. This behavior can be changed with the rule option `packageDir`. Normally ignores imports of modules marked internal, but this can be changed with the rule option `includeInternal`. Type imports can be verified by specifying `includeTypes`.
|
||||
|
||||
Modules have to be installed for this rule to work.
|
||||
|
||||
## Options
|
||||
|
||||
This rule supports the following options:
|
||||
|
||||
`devDependencies`: If set to `false`, then the rule will show an error when `devDependencies` are imported. Defaults to `true`.
|
||||
Type imports are ignored by default.
|
||||
|
||||
`optionalDependencies`: If set to `false`, then the rule will show an error when `optionalDependencies` are imported. Defaults to `true`.
|
||||
|
||||
`peerDependencies`: If set to `false`, then the rule will show an error when `peerDependencies` are imported. Defaults to `true`.
|
||||
|
||||
`bundledDependencies`: If set to `false`, then the rule will show an error when `bundledDependencies` are imported. Defaults to `true`.
|
||||
|
||||
You can set the options like this:
|
||||
|
||||
```js
|
||||
"import/no-extraneous-dependencies": ["error", {"devDependencies": false, "optionalDependencies": false, "peerDependencies": false}]
|
||||
```
|
||||
|
||||
You can also use an array of globs instead of literal booleans:
|
||||
|
||||
```js
|
||||
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.test.js", "**/*.spec.js"]}]
|
||||
```
|
||||
|
||||
When using an array of globs, the setting will be set to `true` (no errors reported) if the name of the file being linted (i.e. not the imported file/module) matches a single glob in the array, and `false` otherwise.
|
||||
|
||||
There are 2 boolean options to opt into checking extra imports that are normally ignored: `includeInternal`, which enables the checking of internal modules, and `includeTypes`, which enables checking of type imports in TypeScript.
|
||||
|
||||
```js
|
||||
"import/no-extraneous-dependencies": ["error", {"includeInternal": true, "includeTypes": true}]
|
||||
```
|
||||
|
||||
Also there is one more option called `packageDir`, this option is to specify the path to the folder containing package.json.
|
||||
|
||||
If provided as a relative path string, will be computed relative to the current working directory at linter execution time. If this is not ideal (does not work with some editor integrations), consider using `__dirname` to provide a path relative to your configuration.
|
||||
|
||||
```js
|
||||
"import/no-extraneous-dependencies": ["error", {"packageDir": './some-dir/'}]
|
||||
// or
|
||||
"import/no-extraneous-dependencies": ["error", {"packageDir": path.join(__dirname, 'some-dir')}]
|
||||
```
|
||||
|
||||
It may also be an array of multiple paths, to support monorepos or other novel project
|
||||
folder layouts:
|
||||
|
||||
```js
|
||||
"import/no-extraneous-dependencies": ["error", {"packageDir": ['./some-dir/', './root-pkg']}]
|
||||
```
|
||||
|
||||
## Rule Details
|
||||
|
||||
Given the following `package.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "my-project",
|
||||
"...": "...",
|
||||
"dependencies": {
|
||||
"builtin-modules": "^1.1.1",
|
||||
"lodash.cond": "^4.2.0",
|
||||
"lodash.find": "^4.2.0",
|
||||
"pkg-up": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^0.13.0",
|
||||
"eslint": "^2.4.0",
|
||||
"eslint-plugin-ava": "^1.3.0",
|
||||
"xo": "^0.13.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"lodash.isarray": "^4.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=15.0.0 <16.0.0"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
"@generated/foo",
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Fail
|
||||
|
||||
```js
|
||||
var _ = require('lodash');
|
||||
import _ from 'lodash';
|
||||
|
||||
import react from 'react';
|
||||
|
||||
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": false}] */
|
||||
import test from 'ava';
|
||||
var test = require('ava');
|
||||
|
||||
/* eslint import/no-extraneous-dependencies: ["error", {"optionalDependencies": false}] */
|
||||
import isArray from 'lodash.isarray';
|
||||
var isArray = require('lodash.isarray');
|
||||
|
||||
/* eslint import/no-extraneous-dependencies: ["error", {"bundledDependencies": false}] */
|
||||
import foo from '"@generated/foo"';
|
||||
var foo = require('"@generated/foo"');
|
||||
|
||||
/* eslint import/no-extraneous-dependencies: ["error", {"includeInternal": true}] */
|
||||
import foo from './foo';
|
||||
var foo = require('./foo');
|
||||
|
||||
/* eslint import/no-extraneous-dependencies: ["error", {"includeTypes": true}] */
|
||||
import type { MyType } from 'foo';
|
||||
```
|
||||
|
||||
## Pass
|
||||
|
||||
```js
|
||||
// Builtin and internal modules are fine
|
||||
var path = require('path');
|
||||
var foo = require('./foo');
|
||||
|
||||
import test from 'ava';
|
||||
import find from 'lodash.find';
|
||||
import isArray from 'lodash.isarray';
|
||||
import foo from '"@generated/foo"';
|
||||
import type { MyType } from 'foo';
|
||||
|
||||
/* eslint import/no-extraneous-dependencies: ["error", {"peerDependencies": true}] */
|
||||
import react from 'react';
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you do not have a `package.json` file in your project.
|
||||
81
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md
generated
vendored
Normal file
81
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md
generated
vendored
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# import/no-import-module-exports
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports the use of import declarations with CommonJS exports in any module
|
||||
except for the [main module](https://docs.npmjs.com/files/package.json#main).
|
||||
|
||||
If you have multiple entry points or are using `js:next` this rule includes an
|
||||
`exceptions` option which you can use to exclude those files from the rule.
|
||||
|
||||
## Options
|
||||
|
||||
### `exceptions`
|
||||
|
||||
- An array of globs. The rule will be omitted from any file that matches a glob
|
||||
in the options array. For example, the following setting will omit the rule
|
||||
in the `some-file.js` file.
|
||||
|
||||
```json
|
||||
"import/no-import-module-exports": ["error", {
|
||||
"exceptions": ["**/*/some-file.js"]
|
||||
}]
|
||||
```
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Fail
|
||||
|
||||
```js
|
||||
import { stuff } from 'starwars'
|
||||
module.exports = thing
|
||||
|
||||
import * as allThings from 'starwars'
|
||||
exports.bar = thing
|
||||
|
||||
import thing from 'other-thing'
|
||||
exports.foo = bar
|
||||
|
||||
import thing from 'starwars'
|
||||
const baz = module.exports = thing
|
||||
console.log(baz)
|
||||
```
|
||||
|
||||
### Pass
|
||||
|
||||
Given the following package.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"main": "lib/index.js",
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
import thing from 'other-thing'
|
||||
export default thing
|
||||
|
||||
const thing = require('thing')
|
||||
module.exports = thing
|
||||
|
||||
const thing = require('thing')
|
||||
exports.foo = bar
|
||||
|
||||
import thing from 'otherthing'
|
||||
console.log(thing.module.exports)
|
||||
|
||||
// in lib/index.js
|
||||
import foo from 'path';
|
||||
module.exports = foo;
|
||||
|
||||
// in some-file.js
|
||||
// eslint import/no-import-module-exports: ["error", {"exceptions": ["**/*/some-file.js"]}]
|
||||
import foo from 'path';
|
||||
module.exports = foo;
|
||||
```
|
||||
|
||||
### Further Reading
|
||||
|
||||
- [webpack issue #4039](https://github.com/webpack/webpack/issues/4039)
|
||||
136
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md
generated
vendored
Normal file
136
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md
generated
vendored
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
# import/no-internal-modules
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Use this rule to prevent importing the submodules of other modules.
|
||||
|
||||
## Rule Details
|
||||
|
||||
This rule has two mutally exclusive options that are arrays of [minimatch/glob patterns](https://github.com/isaacs/node-glob#glob-primer) patterns:
|
||||
|
||||
- `allow` that include paths and import statements that can be imported with reaching.
|
||||
- `forbid` that exclude paths and import statements that can be imported with reaching.
|
||||
|
||||
### Examples
|
||||
|
||||
Given the following folder structure:
|
||||
|
||||
```pt
|
||||
my-project
|
||||
├── actions
|
||||
│ └── getUser.js
|
||||
│ └── updateUser.js
|
||||
├── reducer
|
||||
│ └── index.js
|
||||
│ └── user.js
|
||||
├── redux
|
||||
│ └── index.js
|
||||
│ └── configureStore.js
|
||||
└── app
|
||||
│ └── index.js
|
||||
│ └── settings.js
|
||||
└── entry.js
|
||||
```
|
||||
|
||||
And the .eslintrc file:
|
||||
|
||||
```json
|
||||
{
|
||||
...
|
||||
"rules": {
|
||||
"import/no-internal-modules": [ "error", {
|
||||
"allow": [ "**/actions/*", "source-map-support/*" ],
|
||||
} ]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/entry.js
|
||||
*/
|
||||
|
||||
import { settings } from './app/index'; // Reaching to "./app/index" is not allowed
|
||||
import userReducer from './reducer/user'; // Reaching to "./reducer/user" is not allowed
|
||||
import configureStore from './redux/configureStore'; // Reaching to "./redux/configureStore" is not allowed
|
||||
|
||||
export { settings } from './app/index'; // Reaching to "./app/index" is not allowed
|
||||
export * from './reducer/user'; // Reaching to "./reducer/user" is not allowed
|
||||
```
|
||||
|
||||
The following patterns are NOT considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/entry.js
|
||||
*/
|
||||
|
||||
import 'source-map-support/register';
|
||||
import { settings } from '../app';
|
||||
import getUser from '../actions/getUser';
|
||||
|
||||
export * from 'source-map-support/register';
|
||||
export { settings } from '../app';
|
||||
```
|
||||
|
||||
Given the following folder structure:
|
||||
|
||||
```pt
|
||||
my-project
|
||||
├── actions
|
||||
│ └── getUser.js
|
||||
│ └── updateUser.js
|
||||
├── reducer
|
||||
│ └── index.js
|
||||
│ └── user.js
|
||||
├── redux
|
||||
│ └── index.js
|
||||
│ └── configureStore.js
|
||||
└── app
|
||||
│ └── index.js
|
||||
│ └── settings.js
|
||||
└── entry.js
|
||||
```
|
||||
|
||||
And the .eslintrc file:
|
||||
|
||||
```json
|
||||
{
|
||||
...
|
||||
"rules": {
|
||||
"import/no-internal-modules": [ "error", {
|
||||
"forbid": [ "**/actions/*", "source-map-support/*" ],
|
||||
} ]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/entry.js
|
||||
*/
|
||||
|
||||
import 'source-map-support/register';
|
||||
import getUser from '../actions/getUser';
|
||||
|
||||
export * from 'source-map-support/register';
|
||||
export getUser from '../actions/getUser';
|
||||
```
|
||||
|
||||
The following patterns are NOT considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/entry.js
|
||||
*/
|
||||
|
||||
import 'source-map-support';
|
||||
import { getUser } from '../actions';
|
||||
|
||||
export * from 'source-map-support';
|
||||
export { getUser } from '../actions';
|
||||
```
|
||||
54
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md
generated
vendored
Normal file
54
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# import/no-mutable-exports
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Forbids the use of mutable exports with `var` or `let`.
|
||||
|
||||
## Rule Details
|
||||
|
||||
Valid:
|
||||
|
||||
```js
|
||||
export const count = 1
|
||||
export function getCount() {}
|
||||
export class Counter {}
|
||||
```
|
||||
|
||||
...whereas here exports will be reported:
|
||||
|
||||
```js
|
||||
export let count = 2
|
||||
export var count = 3
|
||||
|
||||
let count = 4
|
||||
export { count } // reported here
|
||||
```
|
||||
|
||||
## Functions/Classes
|
||||
|
||||
Note that exported function/class declaration identifiers may be reassigned,
|
||||
but are not flagged by this rule at this time. They may be in the future, if a
|
||||
reassignment is detected, i.e.
|
||||
|
||||
```js
|
||||
// possible future behavior!
|
||||
export class Counter {} // reported here: exported class is reassigned on line [x].
|
||||
Counter = KitchenSink // not reported here unless you enable no-class-assign
|
||||
|
||||
// this pre-declaration reassignment is valid on account of function hoisting
|
||||
getCount = function getDuke() {} // not reported here without no-func-assign
|
||||
export function getCount() {} // reported here: exported function is reassigned on line [x].
|
||||
```
|
||||
|
||||
To prevent general reassignment of these identifiers, exported or not, you may
|
||||
want to enable the following core ESLint rules:
|
||||
|
||||
- [no-func-assign]
|
||||
- [no-class-assign]
|
||||
|
||||
[no-func-assign]: https://eslint.org/docs/rules/no-func-assign
|
||||
[no-class-assign]: https://eslint.org/docs/rules/no-class-assign
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If your environment correctly implements mutable export bindings.
|
||||
52
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md
generated
vendored
Normal file
52
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# import/no-named-as-default-member
|
||||
|
||||
⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`.
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports use of an exported name as a property on the default export.
|
||||
|
||||
Rationale: Accessing a property that has a name that is shared by an exported
|
||||
name from the same module is likely to be a mistake.
|
||||
|
||||
Named import syntax looks very similar to destructuring assignment. It's easy to
|
||||
make the (incorrect) assumption that named exports are also accessible as
|
||||
properties of the default export.
|
||||
|
||||
Furthermore, [in Babel 5 this is actually how things worked][blog]. This was
|
||||
fixed in Babel 6. Before upgrading an existing codebase to Babel 6, it can be
|
||||
useful to run this lint rule.
|
||||
|
||||
[blog]: https://kentcdodds.com/blog/misunderstanding-es6-modules-upgrading-babel-tears-and-a-solution
|
||||
|
||||
## Rule Details
|
||||
|
||||
Given:
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
export default 'foo';
|
||||
export const bar = 'baz';
|
||||
```
|
||||
|
||||
...this would be valid:
|
||||
|
||||
```js
|
||||
import foo, {bar} from './foo.js';
|
||||
```
|
||||
|
||||
...and the following would be reported:
|
||||
|
||||
```js
|
||||
// Caution: `foo` also has a named export `bar`.
|
||||
// Check if you meant to write `import {bar} from './foo.js'` instead.
|
||||
import foo from './foo.js';
|
||||
const bar = foo.bar;
|
||||
```
|
||||
|
||||
```js
|
||||
// Caution: `foo` also has a named export `bar`.
|
||||
// Check if you meant to write `import {bar} from './foo.js'` instead.
|
||||
import foo from './foo.js';
|
||||
const {bar} = foo;
|
||||
```
|
||||
53
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md
generated
vendored
Normal file
53
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md
generated
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# import/no-named-as-default
|
||||
|
||||
⚠️ This rule _warns_ in the following configs: ☑️ `recommended`, 🚸 `warnings`.
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports use of an exported name as the locally imported name of a default export.
|
||||
|
||||
Rationale: using an exported name as the name of the default export is likely...
|
||||
|
||||
- _misleading_: others familiar with `foo.js` probably expect the name to be `foo`
|
||||
- _a mistake_: only needed to import `bar` and forgot the brackets (the case that is prompting this)
|
||||
|
||||
## Rule Details
|
||||
|
||||
Given:
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
export default 'foo';
|
||||
export const bar = 'baz';
|
||||
```
|
||||
|
||||
...this would be valid:
|
||||
|
||||
```js
|
||||
import foo from './foo.js';
|
||||
```
|
||||
|
||||
...and this would be reported:
|
||||
|
||||
```js
|
||||
// message: Using exported name 'bar' as identifier for default export.
|
||||
import bar from './foo.js';
|
||||
```
|
||||
|
||||
For post-ES2015 `export` extensions, this also prevents exporting the default from a referenced module as a name within that module, for the same reasons:
|
||||
|
||||
```js
|
||||
// valid:
|
||||
export foo from './foo.js';
|
||||
|
||||
// message: Using exported name 'bar' as identifier for default export.
|
||||
export bar from './foo.js';
|
||||
```
|
||||
|
||||
## Further Reading
|
||||
|
||||
- ECMAScript Proposal: [export ns from]
|
||||
- ECMAScript Proposal: [export default from]
|
||||
|
||||
[export ns from]: https://github.com/leebyron/ecmascript-export-ns-from
|
||||
[export default from]: https://github.com/leebyron/ecmascript-export-default-from
|
||||
36
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-named-default.md
generated
vendored
Normal file
36
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-named-default.md
generated
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# import/no-named-default
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports use of a default export as a locally named import.
|
||||
|
||||
Rationale: the syntax exists to import default exports expressively, let's use it.
|
||||
|
||||
Note that type imports, as used by [Flow], are always ignored.
|
||||
|
||||
[Flow]: https://flow.org/
|
||||
|
||||
## Rule Details
|
||||
|
||||
Given:
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
export default 'foo';
|
||||
export const bar = 'baz';
|
||||
```
|
||||
|
||||
...these would be valid:
|
||||
|
||||
```js
|
||||
import foo from './foo.js';
|
||||
import foo, { bar } from './foo.js';
|
||||
```
|
||||
|
||||
...and these would be reported:
|
||||
|
||||
```js
|
||||
// message: Using exported name 'bar' as identifier for default export.
|
||||
import { default as foo } from './foo.js';
|
||||
import { default as foo, bar } from './foo.js';
|
||||
```
|
||||
79
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-named-export.md
generated
vendored
Normal file
79
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-named-export.md
generated
vendored
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
# import/no-named-export
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Prohibit named exports. Mostly an inverse of [`no-default-export`].
|
||||
|
||||
[`no-default-export`]: ./no-default-export.md
|
||||
|
||||
## Rule Details
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```javascript
|
||||
// bad1.js
|
||||
|
||||
// There is only a single module export and it's a named export.
|
||||
export const foo = 'foo';
|
||||
```
|
||||
|
||||
```javascript
|
||||
// bad2.js
|
||||
|
||||
// There is more than one named export in the module.
|
||||
export const foo = 'foo';
|
||||
export const bar = 'bar';
|
||||
```
|
||||
|
||||
```javascript
|
||||
// bad3.js
|
||||
|
||||
// There is more than one named export in the module.
|
||||
const foo = 'foo';
|
||||
const bar = 'bar';
|
||||
export { foo, bar }
|
||||
```
|
||||
|
||||
```javascript
|
||||
// bad4.js
|
||||
|
||||
// There is more than one named export in the module.
|
||||
export * from './other-module'
|
||||
```
|
||||
|
||||
```javascript
|
||||
// bad5.js
|
||||
|
||||
// There is a default and a named export.
|
||||
export const foo = 'foo';
|
||||
const bar = 'bar';
|
||||
export default 'bar';
|
||||
```
|
||||
|
||||
The following patterns are not warnings:
|
||||
|
||||
```javascript
|
||||
// good1.js
|
||||
|
||||
// There is only a single module export and it's a default export.
|
||||
export default 'bar';
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good2.js
|
||||
|
||||
// There is only a single module export and it's a default export.
|
||||
const foo = 'foo';
|
||||
export { foo as default }
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good3.js
|
||||
|
||||
// There is only a single module export and it's a default export.
|
||||
export default from './other-module';
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you don't care if named imports are used, or if you prefer named imports over default imports.
|
||||
44
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-namespace.md
generated
vendored
Normal file
44
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-namespace.md
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# import/no-namespace
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Enforce a convention of not using namespace (a.k.a. "wildcard" `*`) imports.
|
||||
|
||||
The rule is auto-fixable when the namespace object is only used for direct member access, e.g. `namespace.a`.
|
||||
|
||||
## Options
|
||||
|
||||
This rule supports the following options:
|
||||
|
||||
- `ignore`: array of glob strings for modules that should be ignored by the rule.
|
||||
|
||||
## Rule Details
|
||||
|
||||
Valid:
|
||||
|
||||
```js
|
||||
import defaultExport from './foo'
|
||||
import { a, b } from './bar'
|
||||
import defaultExport, { a, b } from './foobar'
|
||||
```
|
||||
|
||||
```js
|
||||
/* eslint import/no-namespace: ["error", {ignore: ['*.ext']}] */
|
||||
import * as bar from './ignored-module.ext';
|
||||
```
|
||||
|
||||
Invalid:
|
||||
|
||||
```js
|
||||
import * as foo from 'foo';
|
||||
```
|
||||
|
||||
```js
|
||||
import defaultExport, * as foo from 'foo';
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you want to use namespaces, you don't want to use this rule.
|
||||
42
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md
generated
vendored
Normal file
42
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# import/no-nodejs-modules
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Forbid the use of Node.js builtin modules. Can be useful for client-side web projects that do not have access to those modules.
|
||||
|
||||
## Options
|
||||
|
||||
This rule supports the following options:
|
||||
|
||||
- `allow`: Array of names of allowed modules. Defaults to an empty array.
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Fail
|
||||
|
||||
```js
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
```
|
||||
|
||||
### Pass
|
||||
|
||||
```js
|
||||
import _ from 'lodash';
|
||||
import foo from 'foo';
|
||||
import foo from './foo';
|
||||
|
||||
var _ = require('lodash');
|
||||
var foo = require('foo');
|
||||
var foo = require('./foo');
|
||||
|
||||
/* eslint import/no-nodejs-modules: ["error", {"allow": ["path"]}] */
|
||||
import path from 'path';
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you have a project that is run mainly or partially using Node.js.
|
||||
69
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md
generated
vendored
Normal file
69
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md
generated
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
# import/no-relative-packages
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Use this rule to prevent importing packages through relative paths.
|
||||
|
||||
It's useful in Yarn/Lerna workspaces, where it's possible to import a sibling package using `../package` relative path, while direct `package` is the correct one.
|
||||
|
||||
## Examples
|
||||
|
||||
Given the following folder structure:
|
||||
|
||||
```pt
|
||||
my-project
|
||||
├── packages
|
||||
│ ├── foo
|
||||
│ │ ├── index.js
|
||||
│ │ └── package.json
|
||||
│ └── bar
|
||||
│ ├── index.js
|
||||
│ └── package.json
|
||||
└── entry.js
|
||||
```
|
||||
|
||||
And the .eslintrc file:
|
||||
|
||||
```json
|
||||
{
|
||||
...
|
||||
"rules": {
|
||||
"import/no-relative-packages": "error"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/packages/foo.js
|
||||
*/
|
||||
|
||||
import bar from '../bar'; // Import sibling package using relative path
|
||||
import entry from '../../entry.js'; // Import from parent package using relative path
|
||||
|
||||
/**
|
||||
* in my-project/entry.js
|
||||
*/
|
||||
|
||||
import bar from './packages/bar'; // Import child package using relative path
|
||||
```
|
||||
|
||||
The following patterns are NOT considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/packages/foo.js
|
||||
*/
|
||||
|
||||
import bar from 'bar'; // Import sibling package using package name
|
||||
|
||||
/**
|
||||
* in my-project/entry.js
|
||||
*/
|
||||
|
||||
import bar from 'bar'; // Import sibling package using package name
|
||||
```
|
||||
123
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md
generated
vendored
Normal file
123
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md
generated
vendored
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
# import/no-relative-parent-imports
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Use this rule to prevent imports to folders in relative parent paths.
|
||||
|
||||
This rule is useful for enforcing tree-like folder structures instead of complex graph-like folder structures. While this restriction might be a departure from Node's default resolution style, it can lead large, complex codebases to be easier to maintain. If you've ever had debates over "where to put files" this rule is for you.
|
||||
|
||||
To fix violations of this rule there are three general strategies. Given this example:
|
||||
|
||||
```pt
|
||||
numbers
|
||||
└── three.js
|
||||
add.js
|
||||
```
|
||||
|
||||
```js
|
||||
// ./add.js
|
||||
export default function (numbers) {
|
||||
return numbers.reduce((sum, n) => sum + n, 0);
|
||||
}
|
||||
|
||||
// ./numbers/three.js
|
||||
import add from '../add'; // violates import/no-relative-parent-imports
|
||||
|
||||
export default function three() {
|
||||
return add([1, 2]);
|
||||
}
|
||||
```
|
||||
|
||||
You can,
|
||||
|
||||
1. Move the file to be in a sibling folder (or higher) of the dependency.
|
||||
|
||||
`three.js` could be be in the same folder as `add.js`:
|
||||
|
||||
```pt
|
||||
three.js
|
||||
add.js
|
||||
```
|
||||
|
||||
or since `add` doesn't have any imports, it could be in it's own directory (namespace):
|
||||
|
||||
```pt
|
||||
math
|
||||
└── add.js
|
||||
three.js
|
||||
```
|
||||
|
||||
2. Pass the dependency as an argument at runtime (dependency injection)
|
||||
|
||||
```js
|
||||
// three.js
|
||||
export default function three(add) {
|
||||
return add([1, 2]);
|
||||
}
|
||||
|
||||
// somewhere else when you use `three.js`:
|
||||
import add from './add';
|
||||
import three from './numbers/three';
|
||||
console.log(three(add));
|
||||
```
|
||||
|
||||
3. Make the dependency a package so it's globally available to all files in your project:
|
||||
|
||||
```js
|
||||
import add from 'add'; // from https://www.npmjs.com/package/add
|
||||
export default function three() {
|
||||
return add([1,2]);
|
||||
}
|
||||
```
|
||||
|
||||
These are (respectively) static, dynamic & global solutions to graph-like dependency resolution.
|
||||
|
||||
## Examples
|
||||
|
||||
Given the following folder structure:
|
||||
|
||||
```pt
|
||||
my-project
|
||||
├── lib
|
||||
│ ├── a.js
|
||||
│ └── b.js
|
||||
└── main.js
|
||||
```
|
||||
|
||||
And the .eslintrc file:
|
||||
|
||||
```json
|
||||
{
|
||||
...
|
||||
"rules": {
|
||||
"import/no-relative-parent-imports": "error"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/lib/a.js
|
||||
*/
|
||||
|
||||
import bar from '../main'; // Import parent file using a relative path
|
||||
```
|
||||
|
||||
The following patterns are NOT considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/main.js
|
||||
*/
|
||||
|
||||
import foo from 'foo'; // Import package using module path
|
||||
import a from './lib/a'; // Import child file using relative path
|
||||
|
||||
/**
|
||||
* in my-project/lib/a.js
|
||||
*/
|
||||
|
||||
import b from './b'; // Import sibling file using relative path
|
||||
```
|
||||
198
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md
generated
vendored
Normal file
198
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md
generated
vendored
Normal file
|
|
@ -0,0 +1,198 @@
|
|||
# import/no-restricted-paths
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Some projects contain files which are not always meant to be executed in the same environment.
|
||||
For example consider a web application that contains specific code for the server and some specific code for the browser/client. In this case you don’t want to import server-only files in your client code.
|
||||
|
||||
In order to prevent such scenarios this rule allows you to define restricted zones where you can forbid files from being imported if they match a specific path.
|
||||
|
||||
## Rule Details
|
||||
|
||||
This rule has one option. The option is an object containing the definition of all restricted `zones` and the optional `basePath` which is used to resolve relative paths within.
|
||||
The default value for `basePath` is the current working directory.
|
||||
|
||||
Each zone consists of the `target` paths, a `from` paths, and an optional `except` and `message` attribute.
|
||||
|
||||
- `target` contains the paths where the restricted imports should be applied. It can be expressed by
|
||||
- directory string path that matches all its containing files
|
||||
- glob pattern matching all the targeted files
|
||||
- an array of multiple of the two types above
|
||||
- `from` paths define the folders that are not allowed to be used in an import. It can be expressed by
|
||||
- directory string path that matches all its containing files
|
||||
- glob pattern matching all the files restricted to be imported
|
||||
- an array of multiple directory string path
|
||||
- an array of multiple glob patterns
|
||||
- `except` may be defined for a zone, allowing exception paths that would otherwise violate the related `from`. Note that it does not alter the behaviour of `target` in any way.
|
||||
- in case `from` contains only glob patterns, `except` must be an array of glob patterns as well
|
||||
- in case `from` contains only directory path, `except` is relative to `from` and cannot backtrack to a parent directory
|
||||
- `message` - will be displayed in case of the rule violation.
|
||||
|
||||
### Examples
|
||||
|
||||
Given the following folder structure:
|
||||
|
||||
```pt
|
||||
my-project
|
||||
├── client
|
||||
│ └── foo.js
|
||||
│ └── baz.js
|
||||
└── server
|
||||
└── bar.js
|
||||
```
|
||||
|
||||
and the current file being linted is `my-project/client/foo.js`.
|
||||
|
||||
The following patterns are considered problems when configuration set to `{ "zones": [ { "target": "./client", "from": "./server" } ] }`:
|
||||
|
||||
```js
|
||||
import bar from '../server/bar';
|
||||
```
|
||||
|
||||
The following patterns are not considered problems when configuration set to `{ "zones": [ { "target": "./client", "from": "./server" } ] }`:
|
||||
|
||||
```js
|
||||
import baz from '../client/baz';
|
||||
```
|
||||
|
||||
---------------
|
||||
|
||||
Given the following folder structure:
|
||||
|
||||
```pt
|
||||
my-project
|
||||
├── client
|
||||
│ └── foo.js
|
||||
│ └── baz.js
|
||||
└── server
|
||||
├── one
|
||||
│ └── a.js
|
||||
│ └── b.js
|
||||
└── two
|
||||
```
|
||||
|
||||
and the current file being linted is `my-project/server/one/a.js`.
|
||||
|
||||
and the current configuration is set to:
|
||||
|
||||
```json
|
||||
{ "zones": [ {
|
||||
"target": "./tests/files/restricted-paths/server/one",
|
||||
"from": "./tests/files/restricted-paths/server",
|
||||
"except": ["./one"]
|
||||
} ] }
|
||||
```
|
||||
|
||||
The following pattern is considered a problem:
|
||||
|
||||
```js
|
||||
import a from '../two/a'
|
||||
```
|
||||
|
||||
The following pattern is not considered a problem:
|
||||
|
||||
```js
|
||||
import b from './b'
|
||||
|
||||
```
|
||||
|
||||
---------------
|
||||
|
||||
Given the following folder structure:
|
||||
|
||||
```pt
|
||||
my-project
|
||||
├── client
|
||||
└── foo.js
|
||||
└── sub-module
|
||||
└── bar.js
|
||||
└── baz.js
|
||||
|
||||
```
|
||||
|
||||
and the current configuration is set to:
|
||||
|
||||
```json
|
||||
{ "zones": [ {
|
||||
"target": "./tests/files/restricted-paths/client/!(sub-module)/**/*",
|
||||
"from": "./tests/files/restricted-paths/client/sub-module/**/*",
|
||||
} ] }
|
||||
```
|
||||
|
||||
The following import is considered a problem in `my-project/client/foo.js`:
|
||||
|
||||
```js
|
||||
import a from './sub-module/baz'
|
||||
```
|
||||
|
||||
The following import is not considered a problem in `my-project/client/sub-module/bar.js`:
|
||||
|
||||
```js
|
||||
import b from './baz'
|
||||
```
|
||||
|
||||
---------------
|
||||
|
||||
Given the following folder structure:
|
||||
|
||||
```pt
|
||||
my-project
|
||||
└── one
|
||||
└── a.js
|
||||
└── b.js
|
||||
└── two
|
||||
└── a.js
|
||||
└── b.js
|
||||
└── three
|
||||
└── a.js
|
||||
└── b.js
|
||||
```
|
||||
|
||||
and the current configuration is set to:
|
||||
|
||||
```json
|
||||
{
|
||||
"zones": [
|
||||
{
|
||||
"target": ["./tests/files/restricted-paths/two/*", "./tests/files/restricted-paths/three/*"],
|
||||
"from": ["./tests/files/restricted-paths/one", "./tests/files/restricted-paths/three"],
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are not considered a problem in `my-project/one/b.js`:
|
||||
|
||||
```js
|
||||
import a from '../three/a'
|
||||
```
|
||||
|
||||
```js
|
||||
import a from './a'
|
||||
```
|
||||
|
||||
The following pattern is not considered a problem in `my-project/two/b.js`:
|
||||
|
||||
```js
|
||||
import a from './a'
|
||||
```
|
||||
|
||||
The following patterns are considered a problem in `my-project/two/a.js`:
|
||||
|
||||
```js
|
||||
import a from '../one/a'
|
||||
```
|
||||
|
||||
```js
|
||||
import a from '../three/a'
|
||||
```
|
||||
|
||||
The following patterns are considered a problem in `my-project/three/b.js`:
|
||||
|
||||
```js
|
||||
import a from '../one/a'
|
||||
```
|
||||
|
||||
```js
|
||||
import a from './a'
|
||||
```
|
||||
32
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-self-import.md
generated
vendored
Normal file
32
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-self-import.md
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# import/no-self-import
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Forbid a module from importing itself. This can sometimes happen during refactoring.
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Fail
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
import foo from './foo';
|
||||
|
||||
const foo = require('./foo');
|
||||
```
|
||||
|
||||
```js
|
||||
// index.js
|
||||
import index from '.';
|
||||
|
||||
const index = require('.');
|
||||
```
|
||||
|
||||
### Pass
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
import bar from './bar';
|
||||
|
||||
const bar = require('./bar');
|
||||
```
|
||||
60
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md
generated
vendored
Normal file
60
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md
generated
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
# import/no-unassigned-import
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
With both CommonJS' `require` and the ES6 modules' `import` syntax, it is possible to import a module but not to use its result. This can be done explicitly by not assigning the module to as variable. Doing so can mean either of the following things:
|
||||
|
||||
- The module is imported but not used
|
||||
- The module has side-effects (like [`should`](https://www.npmjs.com/package/should)). Having side-effects, makes it hard to know whether the module is actually used or can be removed. It can also make it harder to test or mock parts of your application.
|
||||
|
||||
This rule aims to remove modules with side-effects by reporting when a module is imported but not assigned.
|
||||
|
||||
## Options
|
||||
|
||||
This rule supports the following option:
|
||||
|
||||
`allow`: An Array of globs. The files that match any of these patterns would be ignored/allowed by the linter. This can be useful for some build environments (e.g. css-loader in webpack).
|
||||
|
||||
Note that the globs start from the where the linter is executed (usually project root), but not from each file that includes the source. Learn more in both the pass and fail examples below.
|
||||
|
||||
## Fail
|
||||
|
||||
```js
|
||||
import 'should'
|
||||
require('should')
|
||||
|
||||
// In <PROJECT_ROOT>/src/app.js
|
||||
import '../styles/app.css'
|
||||
// {"allow": ["styles/*.css"]}
|
||||
```
|
||||
|
||||
## Pass
|
||||
|
||||
```js
|
||||
import _ from 'foo'
|
||||
import _, {foo} from 'foo'
|
||||
import _, {foo as bar} from 'foo'
|
||||
import {foo as bar} from 'foo'
|
||||
import * as _ from 'foo'
|
||||
|
||||
const _ = require('foo')
|
||||
const {foo} = require('foo')
|
||||
const {foo: bar} = require('foo')
|
||||
const [a, b] = require('foo')
|
||||
const _ = require('foo')
|
||||
|
||||
// Module is not assigned, but it is used
|
||||
bar(require('foo'))
|
||||
require('foo').bar
|
||||
require('foo').bar()
|
||||
require('foo')()
|
||||
|
||||
// With allow option set
|
||||
import './style.css' // {"allow": ["**/*.css"]}
|
||||
import 'babel-register' // {"allow": ["babel-register"]}
|
||||
|
||||
// In <PROJECT_ROOT>/src/app.js
|
||||
import './styles/app.css'
|
||||
import '../scripts/register.js'
|
||||
// {"allow": ["src/styles/**", "**/scripts/*.js"]}
|
||||
```
|
||||
110
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md
generated
vendored
Normal file
110
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md
generated
vendored
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
# import/no-unresolved
|
||||
|
||||
💼 This rule is enabled in the following configs: ❗ `errors`, ☑️ `recommended`.
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Ensures an imported module can be resolved to a module on the local filesystem,
|
||||
as defined by standard Node `require.resolve` behavior.
|
||||
|
||||
See [settings](../../README.md#settings) for customization options for the resolution (i.e.
|
||||
additional filetypes, `NODE_PATH`, etc.)
|
||||
|
||||
This rule can also optionally report on unresolved modules in CommonJS `require('./foo')` calls and AMD `require(['./foo'], function (foo) {...})` and `define(['./foo'], function (foo) {...})`.
|
||||
|
||||
To enable this, send `{ commonjs: true/false, amd: true/false }` as a rule option.
|
||||
Both are disabled by default.
|
||||
|
||||
If you are using Webpack, see the section on [resolvers](../../README.md#resolvers).
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Options
|
||||
|
||||
By default, only ES6 imports will be resolved:
|
||||
|
||||
```js
|
||||
/*eslint import/no-unresolved: 2*/
|
||||
import x from './foo' // reports if './foo' cannot be resolved on the filesystem
|
||||
```
|
||||
|
||||
If `{commonjs: true}` is provided, single-argument `require` calls will be resolved:
|
||||
|
||||
```js
|
||||
/*eslint import/no-unresolved: [2, { commonjs: true }]*/
|
||||
const { default: x } = require('./foo') // reported if './foo' is not found
|
||||
|
||||
require(0) // ignored
|
||||
require(['x', 'y'], function (x, y) { /*...*/ }) // ignored
|
||||
```
|
||||
|
||||
Similarly, if `{ amd: true }` is provided, dependency paths for `define` and `require`
|
||||
calls will be resolved:
|
||||
|
||||
```js
|
||||
/*eslint import/no-unresolved: [2, { amd: true }]*/
|
||||
define(['./foo'], function (foo) { /*...*/ }) // reported if './foo' is not found
|
||||
require(['./foo'], function (foo) { /*...*/ }) // reported if './foo' is not found
|
||||
|
||||
const { default: x } = require('./foo') // ignored
|
||||
```
|
||||
|
||||
Both may be provided, too:
|
||||
|
||||
```js
|
||||
/*eslint import/no-unresolved: [2, { commonjs: true, amd: true }]*/
|
||||
const { default: x } = require('./foo') // reported if './foo' is not found
|
||||
define(['./foo'], function (foo) { /*...*/ }) // reported if './foo' is not found
|
||||
require(['./foo'], function (foo) { /*...*/ }) // reported if './foo' is not found
|
||||
```
|
||||
|
||||
#### `ignore`
|
||||
|
||||
This rule has its own ignore list, separate from [`import/ignore`]. This is because you may want to know whether a module can be located, regardless of whether it can be parsed for exports: `node_modules`, CoffeeScript files, etc. are all good to resolve properly, but will not be parsed if configured as such via [`import/ignore`].
|
||||
|
||||
To suppress errors from files that may not be properly resolved by your [resolver settings](../../README.md#resolver-plugins), you may add an `ignore` key with an array of `RegExp` pattern strings:
|
||||
|
||||
```js
|
||||
/*eslint import/no-unresolved: [2, { ignore: ['\\.img$'] }]*/
|
||||
|
||||
import { x } from './mod' // may be reported, if not resolved to a module
|
||||
|
||||
import coolImg from '../../img/coolImg.img' // will not be reported, even if not found
|
||||
```
|
||||
|
||||
#### `caseSensitive`
|
||||
|
||||
By default, this rule will report paths whose case do not match the underlying filesystem path, if the FS is not case-sensitive. To disable this behavior, set the `caseSensitive` option to `false`.
|
||||
|
||||
```js
|
||||
/*eslint import/no-unresolved: [2, { caseSensitive: true (default) | false }]*/
|
||||
const { default: x } = require('./foo') // reported if './foo' is actually './Foo' and caseSensitive: true
|
||||
```
|
||||
|
||||
#### `caseSensitiveStrict`
|
||||
|
||||
The `caseSensitive` option does not detect case for the current working directory. The `caseSensitiveStrict` option allows checking `cwd` in resolved path. By default, the option is disabled.
|
||||
|
||||
```js
|
||||
/*eslint import/no-unresolved: [2, { caseSensitiveStrict: true }]*/
|
||||
|
||||
// Absolute paths
|
||||
import Foo from `/Users/fOo/bar/file.js` // reported, /Users/foo/bar/file.js
|
||||
import Foo from `d:/fOo/bar/file.js` // reported, d:/foo/bar/file.js
|
||||
|
||||
// Relative paths, cwd is Users/foo/
|
||||
import Foo from `./../fOo/bar/file.js` // reported
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you're using a module bundler other than Node or Webpack, you may end up with a lot of false positive reports of missing dependencies.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- [Resolver plugins](../../README.md#resolvers)
|
||||
- [Node resolver](https://npmjs.com/package/eslint-import-resolver-node) (default)
|
||||
- [Webpack resolver](https://npmjs.com/package/eslint-import-resolver-webpack)
|
||||
- [`import/ignore`] global setting
|
||||
|
||||
[`import/ignore`]: ../../README.md#importignore
|
||||
136
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md
generated
vendored
Normal file
136
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md
generated
vendored
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
# import/no-unused-modules
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Reports:
|
||||
|
||||
- modules without any exports
|
||||
- individual exports not being statically `import`ed or `require`ed from other modules in the same project
|
||||
- dynamic imports are supported if argument is a literal string
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Usage
|
||||
|
||||
In order for this plugin to work, at least one of the options `missingExports` or `unusedExports` must be enabled (see "Options" section below). In the future, these options will be enabled by default (see <https://github.com/import-js/eslint-plugin-import/issues/1324>)
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
"rules: {
|
||||
...otherRules,
|
||||
"import/no-unused-modules": [1, {"unusedExports": true}]
|
||||
}
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
This rule takes the following option:
|
||||
|
||||
- **`missingExports`**: if `true`, files without any exports are reported (defaults to `false`)
|
||||
- **`unusedExports`**: if `true`, exports without any static usage within other modules are reported (defaults to `false`)
|
||||
- **`ignoreUnusedTypeExports`**: if `true`, TypeScript type exports without any static usage within other modules are reported (defaults to `false` and has no effect unless `unusedExports` is `true`)
|
||||
- **`src`**: an array with files/paths to be analyzed. It only applies to unused exports. Defaults to `process.cwd()`, if not provided
|
||||
- **`ignoreExports`**: an array with files/paths for which unused exports will not be reported (e.g module entry points in a published package)
|
||||
|
||||
### Example for missing exports
|
||||
|
||||
#### The following will be reported
|
||||
|
||||
```js
|
||||
const class MyClass { /*...*/ }
|
||||
|
||||
function makeClass() { return new MyClass(...arguments) }
|
||||
```
|
||||
|
||||
#### The following will not be reported
|
||||
|
||||
```js
|
||||
export default function () { /*...*/ }
|
||||
```
|
||||
|
||||
```js
|
||||
export const foo = function () { /*...*/ }
|
||||
```
|
||||
|
||||
```js
|
||||
export { foo, bar }
|
||||
```
|
||||
|
||||
```js
|
||||
export { foo as bar }
|
||||
```
|
||||
|
||||
### Example for unused exports
|
||||
|
||||
given file-f:
|
||||
|
||||
```js
|
||||
import { e } from 'file-a'
|
||||
import { f } from 'file-b'
|
||||
import * as fileC from 'file-c'
|
||||
export { default, i0 } from 'file-d' // both will be reported
|
||||
|
||||
export const j = 99 // will be reported
|
||||
```
|
||||
|
||||
and file-d:
|
||||
|
||||
```js
|
||||
export const i0 = 9 // will not be reported
|
||||
export const i1 = 9 // will be reported
|
||||
export default () => {} // will not be reported
|
||||
```
|
||||
|
||||
and file-c:
|
||||
|
||||
```js
|
||||
export const h = 8 // will not be reported
|
||||
export default () => {} // will be reported, as export * only considers named exports and ignores default exports
|
||||
```
|
||||
|
||||
and file-b:
|
||||
|
||||
```js
|
||||
import two, { b, c, doAnything } from 'file-a'
|
||||
|
||||
export const f = 6 // will not be reported
|
||||
```
|
||||
|
||||
and file-a:
|
||||
|
||||
```js
|
||||
const b = 2
|
||||
const c = 3
|
||||
const d = 4
|
||||
|
||||
export const a = 1 // will be reported
|
||||
|
||||
export { b, c } // will not be reported
|
||||
|
||||
export { d as e } // will not be reported
|
||||
|
||||
export function doAnything() {
|
||||
// some code
|
||||
} // will not be reported
|
||||
|
||||
export default 5 // will not be reported
|
||||
```
|
||||
|
||||
### Unused exports with `ignoreUnusedTypeExports` set to `true`
|
||||
|
||||
The following will not be reported:
|
||||
|
||||
```ts
|
||||
export type Foo = {}; // will not be reported
|
||||
export interface Foo = {}; // will not be reported
|
||||
export enum Foo {}; // will not be reported
|
||||
```
|
||||
|
||||
#### Important Note
|
||||
|
||||
Exports from files listed as a main file (`main`, `browser`, or `bin` fields in `package.json`) will be ignored by default. This only applies if the `package.json` is not set to `private: true`
|
||||
|
||||
## When not to use
|
||||
|
||||
If you don't mind having unused files or dead code within your codebase, you can disable this rule
|
||||
85
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md
generated
vendored
Normal file
85
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md
generated
vendored
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# import/no-useless-path-segments
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Use this rule to prevent unnecessary path segments in import and require statements.
|
||||
|
||||
## Rule Details
|
||||
|
||||
Given the following folder structure:
|
||||
|
||||
```pt
|
||||
my-project
|
||||
├── app.js
|
||||
├── footer.js
|
||||
├── header.js
|
||||
└── helpers.js
|
||||
└── helpers
|
||||
└── index.js
|
||||
├── index.js
|
||||
└── pages
|
||||
├── about.js
|
||||
├── contact.js
|
||||
└── index.js
|
||||
```
|
||||
|
||||
The following patterns are considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/app.js
|
||||
*/
|
||||
|
||||
import "./../my-project/pages/about.js"; // should be "./pages/about.js"
|
||||
import "./../my-project/pages/about"; // should be "./pages/about"
|
||||
import "../my-project/pages/about.js"; // should be "./pages/about.js"
|
||||
import "../my-project/pages/about"; // should be "./pages/about"
|
||||
import "./pages//about"; // should be "./pages/about"
|
||||
import "./pages/"; // should be "./pages"
|
||||
import "./pages/index"; // should be "./pages" (except if there is a ./pages.js file)
|
||||
import "./pages/index.js"; // should be "./pages" (except if there is a ./pages.js file)
|
||||
```
|
||||
|
||||
The following patterns are NOT considered problems:
|
||||
|
||||
```js
|
||||
/**
|
||||
* in my-project/app.js
|
||||
*/
|
||||
|
||||
import "./header.js";
|
||||
import "./pages";
|
||||
import "./pages/about";
|
||||
import ".";
|
||||
import "..";
|
||||
import fs from "fs";
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### noUselessIndex
|
||||
|
||||
If you want to detect unnecessary `/index` or `/index.js` (depending on the specified file extensions, see below) imports in your paths, you can enable the option `noUselessIndex`. By default it is set to `false`:
|
||||
|
||||
```js
|
||||
"import/no-useless-path-segments": ["error", {
|
||||
noUselessIndex: true,
|
||||
}]
|
||||
```
|
||||
|
||||
Additionally to the patterns described above, the following imports are considered problems if `noUselessIndex` is enabled:
|
||||
|
||||
```js
|
||||
// in my-project/app.js
|
||||
import "./helpers/index"; // should be "./helpers/" (not auto-fixable to `./helpers` because this would lead to an ambiguous import of `./helpers.js` and `./helpers/index.js`)
|
||||
import "./pages/index"; // should be "./pages" (auto-fixable)
|
||||
import "./pages/index.js"; // should be "./pages" (auto-fixable)
|
||||
```
|
||||
|
||||
Note: `noUselessIndex` only avoids ambiguous imports for `.js` files if you haven't specified other resolved file extensions. See [Settings: import/extensions](https://github.com/import-js/eslint-plugin-import#importextensions) for details.
|
||||
|
||||
### commonjs
|
||||
|
||||
When set to `true`, this rule checks CommonJS imports. Default to `false`.
|
||||
39
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md
generated
vendored
Normal file
39
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# import/no-webpack-loader-syntax
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Forbid Webpack loader syntax in imports.
|
||||
|
||||
[Webpack](https://webpack.js.org) allows specifying the [loaders](https://webpack.js.org/concepts/loaders/) to use in the import source string using a special syntax like this:
|
||||
|
||||
```js
|
||||
var moduleWithOneLoader = require("my-loader!./my-awesome-module");
|
||||
```
|
||||
|
||||
This syntax is non-standard, so it couples the code to Webpack. The recommended way to specify Webpack loader configuration is in a [Webpack configuration file](https://webpack.js.org/concepts/loaders/#configuration).
|
||||
|
||||
## Rule Details
|
||||
|
||||
### Fail
|
||||
|
||||
```js
|
||||
import myModule from 'my-loader!my-module';
|
||||
import theme from 'style!css!./theme.css';
|
||||
|
||||
var myModule = require('my-loader!./my-module');
|
||||
var theme = require('style!css!./theme.css');
|
||||
```
|
||||
|
||||
### Pass
|
||||
|
||||
```js
|
||||
import myModule from 'my-module';
|
||||
import theme from './theme.css';
|
||||
|
||||
var myModule = require('my-module');
|
||||
var theme = require('./theme.css');
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If you have a project that doesn't use Webpack you can safely disable this rule.
|
||||
434
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/order.md
generated
vendored
Normal file
434
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/order.md
generated
vendored
Normal file
|
|
@ -0,0 +1,434 @@
|
|||
# import/order
|
||||
|
||||
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Enforce a convention in the order of `require()` / `import` statements.
|
||||
|
||||
With the [`groups`](#groups-array) option set to `["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"]` the order is as shown in the following example:
|
||||
|
||||
```ts
|
||||
// 1. node "builtin" modules
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
// 2. "external" modules
|
||||
import _ from 'lodash';
|
||||
import chalk from 'chalk';
|
||||
// 3. "internal" modules
|
||||
// (if you have configured your path or webpack to handle your internal paths differently)
|
||||
import foo from 'src/foo';
|
||||
// 4. modules from a "parent" directory
|
||||
import foo from '../foo';
|
||||
import qux from '../../foo/qux';
|
||||
// 5. "sibling" modules from the same or a sibling's directory
|
||||
import bar from './bar';
|
||||
import baz from './bar/baz';
|
||||
// 6. "index" of the current directory
|
||||
import main from './';
|
||||
// 7. "object"-imports (only available in TypeScript)
|
||||
import log = console.log;
|
||||
// 8. "type" imports (only available in Flow and TypeScript)
|
||||
import type { Foo } from 'foo';
|
||||
```
|
||||
|
||||
Unassigned imports are ignored, as the order they are imported in may be important.
|
||||
|
||||
Statements using the ES6 `import` syntax must appear before any `require()` statements.
|
||||
|
||||
## Fail
|
||||
|
||||
```ts
|
||||
import _ from 'lodash';
|
||||
import path from 'path'; // `path` import should occur before import of `lodash`
|
||||
|
||||
// -----
|
||||
|
||||
var _ = require('lodash');
|
||||
var path = require('path'); // `path` import should occur before import of `lodash`
|
||||
|
||||
// -----
|
||||
|
||||
var path = require('path');
|
||||
import foo from './foo'; // `import` statements must be before `require` statement
|
||||
```
|
||||
|
||||
## Pass
|
||||
|
||||
```ts
|
||||
import path from 'path';
|
||||
import _ from 'lodash';
|
||||
|
||||
// -----
|
||||
|
||||
var path = require('path');
|
||||
var _ = require('lodash');
|
||||
|
||||
// -----
|
||||
|
||||
// Allowed as ̀`babel-register` is not assigned.
|
||||
require('babel-register');
|
||||
var path = require('path');
|
||||
|
||||
// -----
|
||||
|
||||
// Allowed as `import` must be before `require`
|
||||
import foo from './foo';
|
||||
var path = require('path');
|
||||
```
|
||||
|
||||
## Limitations of `--fix`
|
||||
|
||||
Unbound imports are assumed to have side effects, and will never be moved/reordered. This can cause other imports to get "stuck" around them, and the fix to fail.
|
||||
|
||||
```javascript
|
||||
import b from 'b'
|
||||
import 'format.css'; // This will prevent --fix from working.
|
||||
import a from 'a'
|
||||
```
|
||||
|
||||
As a workaround, move unbound imports to be entirely above or below bound ones.
|
||||
|
||||
```javascript
|
||||
import 'format1.css'; // OK
|
||||
import b from 'b'
|
||||
import a from 'a'
|
||||
import 'format2.css'; // OK
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
This rule supports the following options:
|
||||
|
||||
### `groups: [array]`
|
||||
|
||||
How groups are defined, and the order to respect. `groups` must be an array of `string` or [`string`]. The only allowed `string`s are:
|
||||
`"builtin"`, `"external"`, `"internal"`, `"unknown"`, `"parent"`, `"sibling"`, `"index"`, `"object"`, `"type"`.
|
||||
The enforced order is the same as the order of each element in a group. Omitted types are implicitly grouped together as the last element. Example:
|
||||
|
||||
```ts
|
||||
[
|
||||
'builtin', // Built-in types are first
|
||||
['sibling', 'parent'], // Then sibling and parent types. They can be mingled together
|
||||
'index', // Then the index file
|
||||
'object',
|
||||
// Then the rest: internal and external type
|
||||
]
|
||||
```
|
||||
|
||||
The default value is `["builtin", "external", "parent", "sibling", "index"]`.
|
||||
|
||||
You can set the options like this:
|
||||
|
||||
```ts
|
||||
"import/order": [
|
||||
"error",
|
||||
{
|
||||
"groups": [
|
||||
"index",
|
||||
"sibling",
|
||||
"parent",
|
||||
"internal",
|
||||
"external",
|
||||
"builtin",
|
||||
"object",
|
||||
"type"
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### `pathGroups: [array of objects]`
|
||||
|
||||
To be able to group by paths mostly needed with aliases pathGroups can be defined.
|
||||
|
||||
Properties of the objects
|
||||
|
||||
| property | required | type | description |
|
||||
|----------------|:--------:|--------|---------------|
|
||||
| pattern | x | string | minimatch pattern for the paths to be in this group (will not be used for builtins or externals) |
|
||||
| patternOptions | | object | options for minimatch, default: { nocomment: true } |
|
||||
| group | x | string | one of the allowed groups, the pathGroup will be positioned relative to this group |
|
||||
| position | | string | defines where around the group the pathGroup will be positioned, can be 'after' or 'before', if not provided pathGroup will be positioned like the group |
|
||||
|
||||
```json
|
||||
{
|
||||
"import/order": ["error", {
|
||||
"pathGroups": [
|
||||
{
|
||||
"pattern": "~/**",
|
||||
"group": "external"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
### `distinctGroup: [boolean]`
|
||||
|
||||
This changes how `pathGroups[].position` affects grouping. The property is most useful when `newlines-between` is set to `always` and at least 1 `pathGroups` entry has a `position` property set.
|
||||
|
||||
By default, in the context of a particular `pathGroup` entry, when setting `position`, a new "group" will silently be created. That is, even if the `group` is specified, a newline will still separate imports that match that `pattern` with the rest of the group (assuming `newlines-between` is `always`). This is undesirable if your intentions are to use `position` to position _within_ the group (and not create a new one). Override this behavior by setting `distinctGroup` to `false`; this will keep imports within the same group as intended.
|
||||
|
||||
Note that currently, `distinctGroup` defaults to `true`. However, in a later update, the default will change to `false`
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"import/order": ["error", {
|
||||
"newlines-between": "always",
|
||||
"pathGroups": [
|
||||
{
|
||||
"pattern": "@app/**",
|
||||
"group": "external",
|
||||
"position": "after"
|
||||
}
|
||||
],
|
||||
"distinctGroup": false
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
### `pathGroupsExcludedImportTypes: [array]`
|
||||
|
||||
This defines import types that are not handled by configured pathGroups.
|
||||
If you have added path groups with patterns that look like `"builtin"` or `"external"` imports, you have to remove this group (`"builtin"` and/or `"external"`) from the default exclusion list (e.g., `["builtin", "external", "object"]`, etc) to sort these path groups correctly.
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"import/order": ["error", {
|
||||
"pathGroups": [
|
||||
{
|
||||
"pattern": "@app/**",
|
||||
"group": "external",
|
||||
"position": "after"
|
||||
}
|
||||
],
|
||||
"pathGroupsExcludedImportTypes": ["builtin"]
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
[Import Type](https://github.com/import-js/eslint-plugin-import/blob/HEAD/src/core/importType.js#L90) is resolved as a fixed string in predefined set, it can't be a `patterns`(e.g., `react`, `react-router-dom`, etc). See [#2156] for details.
|
||||
|
||||
### `newlines-between: [ignore|always|always-and-inside-groups|never]`
|
||||
|
||||
Enforces or forbids new lines between import groups:
|
||||
|
||||
- If set to `ignore`, no errors related to new lines between import groups will be reported.
|
||||
- If set to `always`, at least one new line between each group will be enforced, and new lines inside a group will be forbidden. To prevent multiple lines between imports, core `no-multiple-empty-lines` rule can be used.
|
||||
- If set to `always-and-inside-groups`, it will act like `always` except newlines are allowed inside import groups.
|
||||
- If set to `never`, no new lines are allowed in the entire import section.
|
||||
|
||||
The default value is `"ignore"`.
|
||||
|
||||
With the default group setting, the following will be invalid:
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"newlines-between": "always"}] */
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import index from './';
|
||||
import sibling from './foo';
|
||||
```
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"newlines-between": "always-and-inside-groups"}] */
|
||||
import fs from 'fs';
|
||||
|
||||
import path from 'path';
|
||||
import index from './';
|
||||
import sibling from './foo';
|
||||
```
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"newlines-between": "never"}] */
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import index from './';
|
||||
|
||||
import sibling from './foo';
|
||||
```
|
||||
|
||||
while those will be valid:
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"newlines-between": "always"}] */
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import index from './';
|
||||
|
||||
import sibling from './foo';
|
||||
```
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"newlines-between": "always-and-inside-groups"}] */
|
||||
import fs from 'fs';
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import index from './';
|
||||
|
||||
import sibling from './foo';
|
||||
```
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"newlines-between": "never"}] */
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import index from './';
|
||||
import sibling from './foo';
|
||||
```
|
||||
|
||||
### `named: true|false|{ enabled: true|false, import: true|false, export: true|false, require: true|false, cjsExports: true|false, types: mixed|types-first|types-last }`
|
||||
|
||||
Enforce ordering of names within imports and exports:
|
||||
|
||||
- If set to `true`, named imports must be ordered according to the `alphabetize` options
|
||||
- If set to `false`, named imports can occur in any order
|
||||
|
||||
`enabled` enables the named ordering for all expressions by default.
|
||||
Use `import`, `export` and `require` and `cjsExports` to override the enablement for the following kind of expressions:
|
||||
|
||||
- `import`:
|
||||
|
||||
```ts
|
||||
import { Readline } from "readline";
|
||||
```
|
||||
|
||||
- `export`:
|
||||
|
||||
```ts
|
||||
export { Readline };
|
||||
// and
|
||||
export { Readline } from "readline";
|
||||
```
|
||||
|
||||
- `require`
|
||||
|
||||
```ts
|
||||
const { Readline } = require("readline");
|
||||
```
|
||||
|
||||
- `cjsExports`
|
||||
|
||||
```ts
|
||||
module.exports.Readline = Readline;
|
||||
// and
|
||||
module.exports = { Readline };
|
||||
```
|
||||
|
||||
The `types` option allows you to specify the order of `import`s and `export`s of `type` specifiers.
|
||||
Following values are possible:
|
||||
|
||||
- `types-first`: forces `type` specifiers to occur first
|
||||
- `types-last`: forces value specifiers to occur first
|
||||
- `mixed`: sorts all specifiers in alphabetical order
|
||||
|
||||
The default value is `false`.
|
||||
|
||||
Example setting:
|
||||
|
||||
```ts
|
||||
{
|
||||
named: true,
|
||||
alphabetize: {
|
||||
order: 'asc'
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This will fail the rule check:
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"named": true, "alphabetize": {"order": "asc"}}] */
|
||||
import { compose, apply } from 'xcompose';
|
||||
```
|
||||
|
||||
While this will pass:
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"named": true, "alphabetize": {"order": "asc"}}] */
|
||||
import { apply, compose } from 'xcompose';
|
||||
```
|
||||
|
||||
### `alphabetize: {order: asc|desc|ignore, orderImportKind: asc|desc|ignore, caseInsensitive: true|false}`
|
||||
|
||||
Sort the order within each group in alphabetical manner based on **import path**:
|
||||
|
||||
- `order`: use `asc` to sort in ascending order, and `desc` to sort in descending order (default: `ignore`).
|
||||
- `orderImportKind`: use `asc` to sort in ascending order various import kinds, e.g. imports prefixed with `type` or `typeof`, with same import path. Use `desc` to sort in descending order (default: `ignore`).
|
||||
- `caseInsensitive`: use `true` to ignore case, and `false` to consider case (default: `false`).
|
||||
|
||||
Example setting:
|
||||
|
||||
```ts
|
||||
alphabetize: {
|
||||
order: 'asc', /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */
|
||||
caseInsensitive: true /* ignore case. Options: [true, false] */
|
||||
}
|
||||
```
|
||||
|
||||
This will fail the rule check:
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"alphabetize": {"order": "asc", "caseInsensitive": true}}] */
|
||||
import React, { PureComponent } from 'react';
|
||||
import aTypes from 'prop-types';
|
||||
import { compose, apply } from 'xcompose';
|
||||
import * as classnames from 'classnames';
|
||||
import blist from 'BList';
|
||||
```
|
||||
|
||||
While this will pass:
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"alphabetize": {"order": "asc", "caseInsensitive": true}}] */
|
||||
import blist from 'BList';
|
||||
import * as classnames from 'classnames';
|
||||
import aTypes from 'prop-types';
|
||||
import React, { PureComponent } from 'react';
|
||||
import { compose, apply } from 'xcompose';
|
||||
```
|
||||
|
||||
### `warnOnUnassignedImports: true|false`
|
||||
|
||||
- default: `false`
|
||||
|
||||
Warns when unassigned imports are out of order. These warning will not be fixed
|
||||
with `--fix` because unassigned imports are used for side-effects and changing the
|
||||
import of order of modules with side effects can not be done automatically in a
|
||||
way that is safe.
|
||||
|
||||
This will fail the rule check:
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"warnOnUnassignedImports": true}] */
|
||||
import fs from 'fs';
|
||||
import './styles.css';
|
||||
import path from 'path';
|
||||
```
|
||||
|
||||
While this will pass:
|
||||
|
||||
```ts
|
||||
/* eslint import/order: ["error", {"warnOnUnassignedImports": true}] */
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import './styles.css';
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [`import/external-module-folders`] setting
|
||||
|
||||
- [`import/internal-regex`] setting
|
||||
|
||||
[`import/external-module-folders`]: ../../README.md#importexternal-module-folders
|
||||
|
||||
[`import/internal-regex`]: ../../README.md#importinternal-regex
|
||||
185
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md
generated
vendored
Normal file
185
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md
generated
vendored
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
# import/prefer-default-export
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
In exporting files, this rule checks if there is default export or not.
|
||||
|
||||
## Rule Details
|
||||
|
||||
### rule schema
|
||||
|
||||
```javascript
|
||||
"import/prefer-default-export": [
|
||||
( "off" | "warn" | "error" ),
|
||||
{ "target": "single" | "any" } // default is "single"
|
||||
]
|
||||
```
|
||||
|
||||
### Config Options
|
||||
|
||||
There are two options available: `single` and `any`. By default, if you do not specify the option, rule will assume it is `single`.
|
||||
|
||||
#### single
|
||||
|
||||
**Definition**: When there is only a single export from a module, prefer using default export over named export.
|
||||
|
||||
How to setup config file for this rule:
|
||||
|
||||
```javascript
|
||||
// you can manually specify it
|
||||
"rules": {
|
||||
"import/prefer-default-export": [
|
||||
( "off" | "warn" | "error" ),
|
||||
{ "target": "single" }
|
||||
]
|
||||
}
|
||||
|
||||
// config setup below will also work
|
||||
"rules": {
|
||||
"import/prefer-default-export": "off" | "warn" | "error"
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```javascript
|
||||
// bad.js
|
||||
|
||||
// There is only a single module export and it's a named export.
|
||||
export const foo = 'foo';
|
||||
|
||||
```
|
||||
|
||||
The following patterns are not warnings:
|
||||
|
||||
```javascript
|
||||
// good1.js
|
||||
|
||||
// There is a default export.
|
||||
export const foo = 'foo';
|
||||
const bar = 'bar';
|
||||
export default bar;
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good2.js
|
||||
|
||||
// There is more than one named export in the module.
|
||||
export const foo = 'foo';
|
||||
export const bar = 'bar';
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good3.js
|
||||
|
||||
// There is more than one named export in the module
|
||||
const foo = 'foo';
|
||||
const bar = 'bar';
|
||||
export { foo, bar }
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good4.js
|
||||
|
||||
// There is a default export.
|
||||
const foo = 'foo';
|
||||
export { foo as default }
|
||||
```
|
||||
|
||||
```javascript
|
||||
// export-star.js
|
||||
|
||||
// Any batch export will disable this rule. The remote module is not inspected.
|
||||
export * from './other-module'
|
||||
```
|
||||
|
||||
#### any
|
||||
|
||||
**Definition**: any exporting file must contain a default export.
|
||||
|
||||
How to setup config file for this rule:
|
||||
|
||||
```javascript
|
||||
// you have to manually specify it
|
||||
"rules": {
|
||||
"import/prefer-default-export": [
|
||||
( "off" | "warn" | "error" ),
|
||||
{ "target": "any" }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The following patterns are *not* considered warnings:
|
||||
|
||||
```javascript
|
||||
// good1.js
|
||||
|
||||
//has default export
|
||||
export default function bar() {};
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good2.js
|
||||
|
||||
// has default export
|
||||
let foo;
|
||||
export { foo as default }
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good3.js
|
||||
|
||||
//contains multiple exports AND default export
|
||||
export const a = 5;
|
||||
export function bar(){};
|
||||
let foo;
|
||||
export { foo as default }
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good4.js
|
||||
|
||||
// does not contain any exports => file is not checked by the rule
|
||||
import * as foo from './foo';
|
||||
```
|
||||
|
||||
```javascript
|
||||
// export-star.js
|
||||
|
||||
// Any batch export will disable this rule. The remote module is not inspected.
|
||||
export * from './other-module'
|
||||
```
|
||||
|
||||
The following patterns are considered warnings:
|
||||
|
||||
```javascript
|
||||
// bad1.js
|
||||
|
||||
//has 2 named exports, but no default export
|
||||
export const foo = 'foo';
|
||||
export const bar = 'bar';
|
||||
```
|
||||
|
||||
```javascript
|
||||
// bad2.js
|
||||
|
||||
// does not have default export
|
||||
let foo, bar;
|
||||
export { foo, bar }
|
||||
```
|
||||
|
||||
```javascript
|
||||
// bad3.js
|
||||
|
||||
// does not have default export
|
||||
export { a, b } from "foo.js"
|
||||
```
|
||||
|
||||
```javascript
|
||||
// bad4.js
|
||||
|
||||
// does not have default export
|
||||
let item;
|
||||
export const foo = item;
|
||||
export { item };
|
||||
```
|
||||
57
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/unambiguous.md
generated
vendored
Normal file
57
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/docs/rules/unambiguous.md
generated
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# import/unambiguous
|
||||
|
||||
<!-- end auto-generated rule header -->
|
||||
|
||||
Warn if a `module` could be mistakenly parsed as a `script` by a consumer leveraging
|
||||
[Unambiguous JavaScript Grammar] to determine correct parsing goal.
|
||||
|
||||
Will respect the [`parserOptions.sourceType`] from ESLint config, i.e. files parsed
|
||||
as `script` per that setting will not be reported.
|
||||
|
||||
This plugin uses [Unambiguous JavaScript Grammar] internally to decide whether
|
||||
dependencies should be parsed as modules and searched for exports matching the
|
||||
`import`ed names, so it may be beneficial to keep this rule on even if your application
|
||||
will run in an explicit `module`-only environment.
|
||||
|
||||
## Rule Details
|
||||
|
||||
For files parsed as `module` by ESLint, the following are valid:
|
||||
|
||||
```js
|
||||
import 'foo'
|
||||
function x() { return 42 }
|
||||
```
|
||||
|
||||
```js
|
||||
export function x() { return 42 }
|
||||
```
|
||||
|
||||
```js
|
||||
(function x() { return 42 })()
|
||||
export {} // simple way to mark side-effects-only file as 'module' without any imports/exports
|
||||
```
|
||||
|
||||
...whereas the following file would be reported:
|
||||
|
||||
```js
|
||||
(function x() { return 42 })()
|
||||
```
|
||||
|
||||
## When Not To Use It
|
||||
|
||||
If your application environment will always know via [some other means](https://github.com/nodejs/node-eps/issues/13)
|
||||
how to parse, regardless of syntax, you may not need this rule.
|
||||
|
||||
Remember, though, that this plugin uses this strategy internally, so if you were
|
||||
to `import` from a module with no `import`s or `export`s, this plugin would not
|
||||
report it as it would not be clear whether it should be considered a `script` or
|
||||
a `module`.
|
||||
|
||||
## Further Reading
|
||||
|
||||
- [Unambiguous JavaScript Grammar]
|
||||
- [`parserOptions.sourceType`]
|
||||
- [node-eps#13](https://github.com/nodejs/node-eps/issues/13)
|
||||
|
||||
[`parserOptions.sourceType`]: https://eslint.org/docs/user-guide/configuring#specifying-parser-options
|
||||
[Unambiguous JavaScript Grammar]: https://github.com/nodejs/node-eps/blob/HEAD/002-es-modules.md#32-determining-if-source-is-an-es-module
|
||||
49
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/fsWalk.js
generated
vendored
Normal file
49
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/fsWalk.js
generated
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
walkSync = walkSync;var _path = require('path');var _path2 = _interopRequireDefault(_path);var _fs = require('fs');function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };} /** @typedef {{ name: string, path: string, dirent: import('fs').Dirent }} Entry */ /**
|
||||
* Do a comprehensive walk of the provided src directory, and collect all entries. Filter out
|
||||
* any directories or entries using the optional filter functions.
|
||||
* @param {string} root - path to the root of the folder we're walking
|
||||
* @param {{ deepFilter?: (entry: Entry) => boolean, entryFilter?: (entry: Entry) => boolean }} options
|
||||
* @param {Entry} currentEntry - entry for the current directory we're working in
|
||||
* @param {Entry[]} existingEntries - list of all entries so far
|
||||
* @returns {Entry[]} an array of directory entries
|
||||
*/ /**
|
||||
* This is intended to provide similar capability as the sync api from @nodelib/fs.walk, until `eslint-plugin-import`
|
||||
* is willing to modernize and update their minimum node version to at least v16. I intentionally made the
|
||||
* shape of the API (for the part we're using) the same as @nodelib/fs.walk so that that can be swapped in
|
||||
* when the repo is ready for it.
|
||||
*/function walkSync(root, options, currentEntry, existingEntries) {// Extract the filter functions. Default to evaluating true, if no filter passed in.
|
||||
var _options$deepFilter = options.deepFilter,deepFilter = _options$deepFilter === undefined ? function () {return true;} : _options$deepFilter,_options$entryFilter = options.entryFilter,entryFilter = _options$entryFilter === undefined ? function () {return true;} : _options$entryFilter;var entryList = existingEntries || [];var currentRelativePath = currentEntry ? currentEntry.path : '.';var fullPath = currentEntry ? _path2['default'].join(root, currentEntry.path) : root;var dirents = (0, _fs.readdirSync)(fullPath, { withFileTypes: true });dirents.forEach(function (dirent) {/** @type {Entry} */var entry = { name: dirent.name, path: _path2['default'].join(currentRelativePath, dirent.name), dirent: dirent };
|
||||
|
||||
|
||||
if (dirent.isDirectory() && deepFilter(entry)) {
|
||||
entryList.push(entry);
|
||||
entryList = walkSync(root, options, entry, entryList);
|
||||
} else if (dirent.isFile() && entryFilter(entry)) {
|
||||
entryList.push(entry);
|
||||
}
|
||||
});
|
||||
|
||||
return entryList;
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL2ZzV2Fsay5qcyJdLCJuYW1lcyI6WyJ3YWxrU3luYyIsInJvb3QiLCJvcHRpb25zIiwiY3VycmVudEVudHJ5IiwiZXhpc3RpbmdFbnRyaWVzIiwiZGVlcEZpbHRlciIsImVudHJ5RmlsdGVyIiwiZW50cnlMaXN0IiwiY3VycmVudFJlbGF0aXZlUGF0aCIsInBhdGgiLCJmdWxsUGF0aCIsImpvaW4iLCJkaXJlbnRzIiwid2l0aEZpbGVUeXBlcyIsImZvckVhY2giLCJkaXJlbnQiLCJlbnRyeSIsIm5hbWUiLCJpc0RpcmVjdG9yeSIsInB1c2giLCJpc0ZpbGUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQXFCZ0JBLFEsR0FBQUEsUSxDQWRoQiw0QiwyQ0FDQSx3QixnR0FFQSxtRixDQUVBOzs7Ozs7OzsyU0FaQTs7Ozs7OFNBcUJPLFNBQVNBLFFBQVQsQ0FBa0JDLElBQWxCLEVBQXdCQyxPQUF4QixFQUFpQ0MsWUFBakMsRUFBK0NDLGVBQS9DLEVBQWdFLENBQ3JFO0FBRHFFLDRCQUVQRixPQUZPLENBRTdERyxVQUY2RCxDQUU3REEsVUFGNkQsdUNBRWhELG9CQUFNLElBQU4sRUFGZ0QsOENBRVBILE9BRk8sQ0FFcENJLFdBRm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HJ5ID0ge1xuICAgICAgbmFtZTogZGlyZW50Lm5hbWUsXG4gICAgICBwYXRoOiBwYXRoLmpvaW4oY3VycmVudFJlbGF0aXZlUGF0aCwgZGlyZW50Lm5hbWUpLFxuICAgICAgZGlyZW50LFxuICAgIH07XG5cbiAgICBpZiAoZGlyZW50LmlzRGlyZWN0b3J5KCkgJiYgZGVlcEZpbHRlcihlbnRyeSkpIHtcbiAgICAgIGVudHJ5TGlzdC5wdXNoKGVudHJ5KTtcbiAgICAgIGVudHJ5TGlzdCA9IHdhbGtTeW5jKHJvb3QsIG9wdGlvbnMsIGVudHJ5LCBlbnRyeUxpc3QpO1xuICAgIH0gZWxzZSBpZiAoZGlyZW50LmlzRmlsZSgpICYmIGVudHJ5RmlsdGVyKGVudHJ5KSkge1xuICAgICAgZW50cnlMaXN0LnB1c2goZW50cnkpO1xuICAgIH1cbiAgfSk7XG5cbiAgcmV0dXJuIGVudHJ5TGlzdDtcbn1cbiJdfQ==
|
||||
128
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/importType.js
generated
vendored
Normal file
128
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/importType.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
23
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/packagePath.js
generated
vendored
Normal file
23
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/packagePath.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.
|
||||
|
||||
|
||||
|
||||
|
||||
getFilePackagePath = getFilePackagePath;exports.
|
||||
|
||||
|
||||
|
||||
|
||||
getContextPackagePath = getContextPackagePath;exports.
|
||||
|
||||
|
||||
|
||||
getFilePackageName = getFilePackageName;var _path = require('path');var _contextCompat = require('eslint-module-utils/contextCompat');var _pkgUp = require('eslint-module-utils/pkgUp');var _pkgUp2 = _interopRequireDefault(_pkgUp);var _readPkgUp2 = require('eslint-module-utils/readPkgUp');var _readPkgUp3 = _interopRequireDefault(_readPkgUp2);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function getFilePackagePath(filePath) {var fp = (0, _pkgUp2['default'])({ cwd: filePath });return (0, _path.dirname)(fp);}function getContextPackagePath(context) {return getFilePackagePath((0, _contextCompat.getPhysicalFilename)(context));}function getFilePackageName(filePath) {var _readPkgUp =
|
||||
(0, _readPkgUp3['default'])({ cwd: filePath, normalize: false }),pkg = _readPkgUp.pkg,path = _readPkgUp.path;
|
||||
if (pkg) {
|
||||
// recursion in case of intermediate esm package.json without name found
|
||||
return pkg.name || getFilePackageName((0, _path.dirname)((0, _path.dirname)(path)));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL3BhY2thZ2VQYXRoLmpzIl0sIm5hbWVzIjpbImdldEZpbGVQYWNrYWdlUGF0aCIsImdldENvbnRleHRQYWNrYWdlUGF0aCIsImdldEZpbGVQYWNrYWdlTmFtZSIsImZpbGVQYXRoIiwiZnAiLCJjd2QiLCJjb250ZXh0Iiwibm9ybWFsaXplIiwicGtnIiwicGF0aCIsIm5hbWUiXSwibWFwcGluZ3MiOiI7Ozs7O0FBS2dCQSxrQixHQUFBQSxrQjs7Ozs7QUFLQUMscUIsR0FBQUEscUI7Ozs7QUFJQUMsa0IsR0FBQUEsa0IsQ0FkaEIsNEJBQ0Esa0VBQ0Esa0QsNkNBQ0EsMkQscUpBRU8sU0FBU0Ysa0JBQVQsQ0FBNEJHLFFBQTVCLEVBQXNDLENBQzNDLElBQU1DLEtBQUssd0JBQU0sRUFBRUMsS0FBS0YsUUFBUCxFQUFOLENBQVgsQ0FDQSxPQUFPLG1CQUFRQyxFQUFSLENBQVAsQ0FDRCxDQUVNLFNBQVNILHFCQUFULENBQStCSyxPQUEvQixFQUF3QyxDQ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pKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGdldEZpbGVQYWNrYWdlTmFtZShmaWxlUGF0aCkge1xuICBjb25zdCB7IHBrZywgcGF0aCB9ID0gcmVhZFBrZ1VwKHsgY3dkOiBmaWxlUGF0aCwgbm9ybWFsaXplOiBmYWxzZSB9KTtcbiAgaWYgKHBrZykge1xuICAgIC8vIHJlY3Vyc2lvbiBpbiBjYXNlIG9mIGludGVybWVkaWF0ZSBlc20gcGFja2FnZS5qc29uIHdpdGhvdXQgbmFtZSBmb3VuZFxuICAgIHJldHVybiBwa2cubmFtZSB8fCBnZXRGaWxlUGFja2FnZU5hbWUoZGlybmFtZShkaXJuYW1lKHBhdGgpKSk7XG4gIH1cbiAgcmV0dXJuIG51bGw7XG59XG4iXX0=
|
||||
13
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/sourceType.js
generated
vendored
Normal file
13
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/sourceType.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] =
|
||||
|
||||
|
||||
|
||||
sourceType; /**
|
||||
* @param {import('eslint').Rule.RuleContext} context
|
||||
* @returns 'module' | 'script' | 'commonjs' | undefined
|
||||
*/function sourceType(context) {if ('sourceType' in context.parserOptions) {return context.parserOptions.sourceType;}
|
||||
if ('languageOptions' in context && context.languageOptions) {
|
||||
return context.languageOptions.sourceType;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL3NvdXJjZVR5cGUuanMiXSwibmFtZXMiOlsic291cmNlVHlwZSIsImNvbnRleHQiLCJwYXJzZXJPcHRpb25zIiwibGFuZ3VhZ2VPcHRpb25zIl0sIm1hcHBpbmdzIjoiOzs7O0FBSXdCQSxVLEVBSnhCOzs7ZUFJZSxTQUFTQSxVQUFULENBQW9CQyxPQUFwQixFQUE2QixDQUMxQyxJQUFJLGdCQUFnQkEsUUFBUUMsYUFBNUIsRUFBMkMsQ0FDekMsT0FBT0QsUUFBUUMsYUFBUixDQUFzQkYsVUFBN0IsQ0FDRDtBQUNELE1BQUkscUJBQXFCQyxPQUFyQixJQUFnQ0EsUUFBUUUsZUFBNUMsRUFBNkQ7QUFDM0QsV0FBT0YsUUFBUUUsZUFBUixDQUF3QkgsVUFBL0I7QUFDRDtBQUNGIiwiZmlsZSI6InNvdXJjZVR5cGUuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBwYXJhbSB7aW1wb3J0KCdlc2xpbnQnKS5SdWxlLlJ1bGVDb250ZXh0fSBjb250ZXh0XG4gKiBAcmV0dXJucyAnbW9kdWxlJyB8ICdzY3JpcHQnIHwgJ2NvbW1vbmpzJyB8IHVuZGVmaW5lZFxuICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBzb3VyY2VUeXBlKGNvbnRleHQpIHtcbiAgaWYgKCdzb3VyY2VUeXBlJyBpbiBjb250ZXh0LnBhcnNlck9wdGlvbnMpIHtcbiAgICByZXR1cm4gY29udGV4dC5wYXJzZXJPcHRpb25zLnNvdXJjZVR5cGU7XG4gIH1cbiAgaWYgKCdsYW5ndWFnZU9wdGlvbnMnIGluIGNvbnRleHQgJiYgY29udGV4dC5sYW5ndWFnZU9wdGlvbnMpIHtcbiAgICByZXR1cm4gY29udGV4dC5sYW5ndWFnZU9wdGlvbnMuc291cmNlVHlwZTtcbiAgfVxufVxuIl19
|
||||
11
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/staticRequire.js
generated
vendored
Normal file
11
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/core/staticRequire.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] =
|
||||
isStaticRequire; // todo: merge with module visitor
|
||||
function isStaticRequire(node) {return node &&
|
||||
node.callee &&
|
||||
node.callee.type === 'Identifier' &&
|
||||
node.callee.name === 'require' &&
|
||||
node.arguments.length === 1 &&
|
||||
node.arguments[0].type === 'Literal' &&
|
||||
typeof node.arguments[0].value === 'string';
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb3JlL3N0YXRpY1JlcXVpcmUuanMiXSwibmFtZXMiOlsiaXNTdGF0aWNSZXF1aXJlIiwibm9kZSIsImNhbGxlZSIsInR5cGUiLCJuYW1lIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwidmFsdWUiXSwibWFwcGluZ3MiOiI7QUFDd0JBLGUsRUFEeEI7QUFDZSxTQUFTQSxlQUFULENBQXlCQyxJQUF6QixFQUErQixDQUM1QyxPQUFPQTtBQUNGQSxPQUFLQyxNQURIO0FBRUZELE9BQUtDLE1BQUwsQ0FBWUMsSUFBWixLQUFxQixZQUZuQjtBQUdGRixPQUFLQyxNQUFMLENBQVlFLElBQVosS0FBcUIsU0FIbkI7QUFJRkgsT0FBS0ksU0FBTCxDQUFlQyxNQUFmLEtBQTBCLENBSnhCO0FBS0ZMLE9BQUtJLFNBQUwsQ0FBZSxDQUFmLEVBQWtCRixJQUFsQixLQUEyQixTQUx6QjtBQU1GLFNBQU9GLEtBQUtJLFNBQUwsQ0FBZSxDQUFmLEVBQWtCRSxLQUF6QixLQUFtQyxRQU54QztBQU9EIiwiZmlsZSI6InN0YXRpY1JlcXVpcmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyB0b2RvOiBtZXJnZSB3aXRoIG1vZHVsZSB2aXNpdG9yXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBpc1N0YXRpY1JlcXVpcmUobm9kZSkge1xuICByZXR1cm4gbm9kZVxuICAgICYmIG5vZGUuY2FsbGVlXG4gICAgJiYgbm9kZS5jYWxsZWUudHlwZSA9PT0gJ0lkZW50aWZpZXInXG4gICAgJiYgbm9kZS5jYWxsZWUubmFtZSA9PT0gJ3JlcXVpcmUnXG4gICAgJiYgbm9kZS5hcmd1bWVudHMubGVuZ3RoID09PSAxXG4gICAgJiYgbm9kZS5hcmd1bWVudHNbMF0udHlwZSA9PT0gJ0xpdGVyYWwnXG4gICAgJiYgdHlwZW9mIG5vZGUuYXJndW1lbnRzWzBdLnZhbHVlID09PSAnc3RyaW5nJztcbn1cbiJdfQ==
|
||||
8
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/docsUrl.js
generated
vendored
Normal file
8
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/docsUrl.js
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] =
|
||||
|
||||
|
||||
|
||||
docsUrl;var _package = require('../package.json');var _package2 = _interopRequireDefault(_package);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}var repoUrl = 'https://github.com/import-js/eslint-plugin-import';function docsUrl(ruleName) {var commitish = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'v' + String(_package2['default'].version);
|
||||
return repoUrl + '/blob/' + String(commitish) + '/docs/rules/' + String(ruleName) + '.md';
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9kb2NzVXJsLmpzIl0sIm5hbWVzIjpbImRvY3NVcmwiLCJyZXBvVXJsIiwicnVsZU5hbWUiLCJjb21taXRpc2giLCJwa2ciLCJ2ZXJzaW9uIl0sIm1hcHBpbmdzIjoiOzs7O0FBSXdCQSxPLENBSnhCLDBDLGdKQUVBLElBQU1DLFVBQVUsbURBQWhCLENBRWUsU0FBU0QsT0FBVCxDQUFpQkUsUUFBakIsRUFBMEQsS0FBL0JDLFNBQStCLG9GQUFmQyxxQkFBSUMsT0FBVztBQUN2RSxTQUFVSixPQUFWLHFCQUEwQkUsU0FBMUIsNEJBQWtERCxRQUFsRDtBQUNEIiwiZmlsZSI6ImRvY3NVcmwuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGtnIGZyb20gJy4uL3BhY2thZ2UuanNvbic7XG5cbmNvbnN0IHJlcG9VcmwgPSAnaHR0cHM6Ly9naXRodWIuY29tL2ltcG9ydC1qcy9lc2xpbnQtcGx1Z2luLWltcG9ydCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGRvY3NVcmwocnVsZU5hbWUsIGNvbW1pdGlzaCA9IGB2JHtwa2cudmVyc2lvbn1gKSB7XG4gIHJldHVybiBgJHtyZXBvVXJsfS9ibG9iLyR7Y29tbWl0aXNofS9kb2NzL3J1bGVzLyR7cnVsZU5hbWV9Lm1kYDtcbn1cbiJdfQ==
|
||||
210
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/builder.js
generated
vendored
Normal file
210
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/builder.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
61
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/captureDependency.js
generated
vendored
Normal file
61
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/captureDependency.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
57
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/childContext.js
generated
vendored
Normal file
57
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/childContext.js
generated
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] =
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
childContext;var _hash = require('eslint-module-utils/hash');var optionsHash = '';var prevOptions = '';var settingsHash = '';var prevSettings = ''; // Replacer function helps us with serializing the parser nested within `languageOptions`.
|
||||
function stringifyReplacerFn(_, value) {if (typeof value === 'function') {return String(value);}return value;} /**
|
||||
* don't hold full context object in memory, just grab what we need.
|
||||
* also calculate a cacheKey, where parts of the cacheKey hash are memoized
|
||||
*/function childContext(path, context) {var settings = context.settings,parserOptions = context.parserOptions,parserPath = context.parserPath,languageOptions = context.languageOptions;if (JSON.stringify(settings) !== prevSettings) {settingsHash = (0, _hash.hashObject)({ settings: settings }).digest('hex');
|
||||
prevSettings = JSON.stringify(settings);
|
||||
}
|
||||
|
||||
// We'll use either a combination of `parserOptions` and `parserPath` or `languageOptions`
|
||||
// to construct the cache key, depending on whether this is using a flat config or not.
|
||||
var optionsToken = void 0;
|
||||
if (!parserPath && languageOptions) {
|
||||
if (JSON.stringify(languageOptions, stringifyReplacerFn) !== prevOptions) {
|
||||
optionsHash = (0, _hash.hashObject)({ languageOptions: languageOptions }).digest('hex');
|
||||
prevOptions = JSON.stringify(languageOptions, stringifyReplacerFn);
|
||||
}
|
||||
// For languageOptions, we're just using the hashed options as the options token
|
||||
optionsToken = optionsHash;
|
||||
} else {
|
||||
if (JSON.stringify(parserOptions) !== prevOptions) {
|
||||
optionsHash = (0, _hash.hashObject)({ parserOptions: parserOptions }).digest('hex');
|
||||
prevOptions = JSON.stringify(parserOptions);
|
||||
}
|
||||
// When not using flat config, we use a combination of the hashed parserOptions
|
||||
// and parserPath as the token
|
||||
optionsToken = String(parserPath) + optionsHash;
|
||||
}
|
||||
|
||||
return {
|
||||
cacheKey: optionsToken + settingsHash + String(path),
|
||||
settings: settings,
|
||||
parserOptions: parserOptions,
|
||||
parserPath: parserPath,
|
||||
path: path,
|
||||
languageOptions: languageOptions };
|
||||
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leHBvcnRNYXAvY2hpbGRD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CdoZXgnKTtcbiAgICAgIHByZXZPcHRpb25zID0gSlNPTi5zdHJpbmdpZnkocGFyc2VyT3B0aW9ucyk7XG4gICAgfVxuICAgIC8vIFdoZW4gbm90IHVzaW5nIGZsYXQgY29uZmlnLCB3ZSB1c2UgYSBjb21iaW5hdGlvbiBvZiB0aGUgaGFzaGVkIHBhcnNlck9wdGlvbnNcbiAgICAvLyBhbmQgcGFyc2VyUGF0aCBhcyB0aGUgdG9rZW5cbiAgICBvcHRpb25zVG9rZW4gPSBTdHJpbmcocGFyc2VyUGF0aCkgKyBvcHRpb25zSGFzaDtcbiAgfVxuXG4gIHJldHVybiB7XG4gICAgY2FjaGVLZXk6IG9wdGlvbnNUb2tlbiArIHNldHRpbmdzSGFzaCArIFN0cmluZyhwYXRoKSxcbiAgICBzZXR0aW5ncyxcbiAgICBwYXJzZXJPcHRpb25zLFxuICAgIHBhcnNlclBhdGgsXG4gICAgcGF0aCxcbiAgICBsYW5ndWFnZU9wdGlvbnMsXG4gIH07XG59XG4iXX0=
|
||||
90
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/doc.js
generated
vendored
Normal file
90
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/doc.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
180
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/index.js
generated
vendored
Normal file
180
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
39
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/namespace.js
generated
vendored
Normal file
39
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/namespace.js
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _createClass = function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};}();var _childContext = require('./childContext');var _childContext2 = _interopRequireDefault(_childContext);
|
||||
var _remotePath = require('./remotePath');function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}var
|
||||
|
||||
Namespace = function () {
|
||||
function Namespace(
|
||||
path,
|
||||
context,
|
||||
ExportMapBuilder)
|
||||
{_classCallCheck(this, Namespace);
|
||||
this.remotePathResolver = new _remotePath.RemotePath(path, context);
|
||||
this.context = context;
|
||||
this.ExportMapBuilder = ExportMapBuilder;
|
||||
this.namespaces = new Map();
|
||||
}_createClass(Namespace, [{ key: 'resolveImport', value: function () {function resolveImport(
|
||||
|
||||
value) {
|
||||
var rp = this.remotePathResolver.resolve(value);
|
||||
if (rp == null) {return null;}
|
||||
return this.ExportMapBuilder['for']((0, _childContext2['default'])(rp, this.context));
|
||||
}return resolveImport;}() }, { key: 'getNamespace', value: function () {function getNamespace(
|
||||
|
||||
identifier) {var _this = this;
|
||||
if (!this.namespaces.has(identifier.name)) {return;}
|
||||
return function () {return _this.resolveImport(_this.namespaces.get(identifier.name));};
|
||||
}return getNamespace;}() }, { key: 'add', value: function () {function add(
|
||||
|
||||
object, identifier) {
|
||||
var nsfn = this.getNamespace(identifier);
|
||||
if (nsfn) {
|
||||
Object.defineProperty(object, 'namespace', { get: nsfn });
|
||||
}
|
||||
|
||||
return object;
|
||||
}return add;}() }, { key: 'rawSet', value: function () {function rawSet(
|
||||
|
||||
name, value) {
|
||||
this.namespaces.set(name, value);
|
||||
}return rawSet;}() }]);return Namespace;}();exports['default'] = Namespace;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base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b3J0TWFwQnVpbGRlciA9IEV4cG9ydE1hcEJ1aWxkZXI7XG4gICAgdGhpcy5uYW1lc3BhY2VzID0gbmV3IE1hcCgpO1xuICB9XG5cbiAgcmVzb2x2ZUltcG9ydCh2YWx1ZSkge1xuICAgIGNvbnN0IHJwID0gdGhpcy5yZW1vdGVQYXRoUmVzb2x2ZXIucmVzb2x2ZSh2YWx1ZSk7XG4gICAgaWYgKHJwID09IG51bGwpIHsgcmV0dXJuIG51bGw7IH1cbiAgICByZXR1cm4gdGhpcy5FeHBvcnRNYXBCdWlsZGVyLmZvcihjaGlsZENvbnRleHQocnAsIHRoaXMuY29udGV4dCkpO1xuICB9XG5cbiAgZ2V0TmFtZXNwYWNlKGlkZW50aWZpZXIpIHtcbiAgICBpZiAoIXRoaXMubmFtZXNwYWNlcy5oYXMoaWRlbnRpZmllci5uYW1lKSkgeyByZXR1cm47IH1cbiAgICByZXR1cm4gKCkgPT4gdGhpcy5yZXNvbHZlSW1wb3J0KHRoaXMubmFtZXNwYWNlcy5nZXQoaWRlbnRpZmllci5uYW1lKSk7XG4gIH1cblxuICBhZGQob2JqZWN0LCBpZGVudGlmaWVyKSB7XG4gICAgY29uc3QgbnNmbiA9IHRoaXMuZ2V0TmFtZXNwYWNlKGlkZW50aWZpZXIpO1xuICAgIGlmIChuc2ZuKSB7XG4gICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkob2JqZWN0LCAnbmFtZXNwYWNlJywgeyBnZXQ6IG5zZm4gfSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIG9iamVjdDtcbiAgfVxuXG4gIHJhd1NldChuYW1lLCB2YWx1ZSkge1xuICAgIHRoaXMubmFtZXNwYWNlcy5zZXQobmFtZSwgdmFsdWUpO1xuICB9XG59XG4iXX0=
|
||||
41
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/patternCapture.js
generated
vendored
Normal file
41
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/patternCapture.js
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] =
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
recursivePatternCapture; /**
|
||||
* Traverse a pattern/identifier node, calling 'callback'
|
||||
* for each leaf identifier.
|
||||
* @param {node} pattern
|
||||
* @param {Function} callback
|
||||
* @return {void}
|
||||
*/function recursivePatternCapture(pattern, callback) {switch (pattern.type) {case 'Identifier': // base case
|
||||
callback(pattern);break;case 'ObjectPattern':pattern.properties.forEach(function (p) {
|
||||
if (p.type === 'ExperimentalRestProperty' || p.type === 'RestElement') {
|
||||
callback(p.argument);
|
||||
return;
|
||||
}
|
||||
recursivePatternCapture(p.value, callback);
|
||||
});
|
||||
break;
|
||||
|
||||
case 'ArrayPattern':
|
||||
pattern.elements.forEach(function (element) {
|
||||
if (element == null) {return;}
|
||||
if (element.type === 'ExperimentalRestProperty' || element.type === 'RestElement') {
|
||||
callback(element.argument);
|
||||
return;
|
||||
}
|
||||
recursivePatternCapture(element, callback);
|
||||
});
|
||||
break;
|
||||
|
||||
case 'AssignmentPattern':
|
||||
callback(pattern.left);
|
||||
break;
|
||||
default:}
|
||||
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leHBvcnRNYXAvcGF0dGVybkNhcHR1cmUuanMiXSwibmFtZXMiOlsicmVjdXJzaXZlUGF0dGVybkNhcHR1cmUiLCJwYXR0ZXJuIiwiY2FsbGJhY2siLCJ0eXBlIiwicHJvcGVydGllcyIsImZvckVhY2giLCJwIiwiYXJndW1lbnQiLCJ2YWx1ZSIsImVsZW1lbnRzIiwiZWxlbWVudCIsImxlZnQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFPd0JBLHVCLEVBUHhCOzs7Ozs7NEJBT2UsU0FBU0EsdUJBQVQsQ0FBaUNDLE9BQWpDLEV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cnNpdmVQYXR0ZXJuQ2FwdHVyZShlbGVtZW50LCBjYWxsYmFjayk7XG4gICAgICB9KTtcbiAgICAgIGJyZWFrO1xuXG4gICAgY2FzZSAnQXNzaWdubWVudFBhdHRlcm4nOlxuICAgICAgY2FsbGJhY2socGF0dGVybi5sZWZ0KTtcbiAgICAgIGJyZWFrO1xuICAgIGRlZmF1bHQ6XG4gIH1cbn1cbiJdfQ==
|
||||
12
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/remotePath.js
generated
vendored
Normal file
12
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/remotePath.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.RemotePath = undefined;var _createClass = function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};}();var _resolve2 = require('eslint-module-utils/resolve');var _resolve3 = _interopRequireDefault(_resolve2);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}var
|
||||
|
||||
RemotePath = exports.RemotePath = function () {
|
||||
function RemotePath(path, context) {_classCallCheck(this, RemotePath);
|
||||
this.path = path;
|
||||
this.context = context;
|
||||
}_createClass(RemotePath, [{ key: 'resolve', value: function () {function resolve(
|
||||
|
||||
value) {
|
||||
return _resolve3['default'].relative(value, this.path, this.context.settings);
|
||||
}return resolve;}() }]);return RemotePath;}();
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leHBvcnRNYXAvcmVtb3RlUGF0aC5qcyJdLCJuYW1lcyI6WyJSZW1vdGVQYXRoIiwicGF0aCIsImNvbnRleHQiLCJ2YWx1ZSIsInJlc29sdmUiLCJyZWxhdGl2ZSIsInNldHRpbmdzIl0sIm1hcHBpbmdzIjoiK29CQUFBLHVEOztBQUVhQSxVLFdBQUFBLFU7QUFDWCxzQkFBWUMsSUFBWixFQUFrQkMsT0FBbEIsRUFBMkI7QUFDekIsU0FBS0QsSUFBTCxHQUFZQSxJQUFaO0FBQ0EsU0FBS0MsT0FBTCxHQUFlQSxPQUFmO0FBQ0QsRzs7QUFFT0MsVyxFQUFPO0FBQ2IsZUFBT0MscUJBQVFDLFFBQVIsQ0FBaUJGLEtBQWpCLEVBQXdCLEtBQUtGLElBQTdCLEVBQW1DLEtBQUtDLE9BQUwsQ0FBYUksUUFBaEQsQ0FBUDtBQUNELE8iLCJmaWxlIjoicmVtb3RlUGF0aC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCByZXNvbHZlIGZyb20gJ2VzbGludC1tb2R1bGUtdXRpbHMvcmVzb2x2ZSc7XG5cbmV4cG9ydCBjbGFzcyBSZW1vdGVQYXRoIHtcbiAgY29uc3RydWN0b3IocGF0aCwgY29udGV4dCkge1xuICAgIHRoaXMucGF0aCA9IHBhdGg7XG4gICAgdGhpcy5jb250ZXh0ID0gY29udGV4dDtcbiAgfVxuXG4gIHJlc29sdmUodmFsdWUpIHtcbiAgICByZXR1cm4gcmVzb2x2ZS5yZWxhdGl2ZSh2YWx1ZSwgdGhpcy5wYXRoLCB0aGlzLmNvbnRleHQuc2V0dGluZ3MpO1xuICB9XG59XG4iXX0=
|
||||
33
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/specifier.js
generated
vendored
Normal file
33
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/specifier.js
generated
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] = processSpecifier;function processSpecifier(specifier, astNode, exportMap, namespace) {
|
||||
var nsource = astNode.source && astNode.source.value;
|
||||
var exportMeta = {};
|
||||
var local = void 0;
|
||||
|
||||
switch (specifier.type) {
|
||||
case 'ExportDefaultSpecifier':
|
||||
if (!nsource) {return;}
|
||||
local = 'default';
|
||||
break;
|
||||
case 'ExportNamespaceSpecifier':
|
||||
exportMap.namespace.set(specifier.exported.name, Object.defineProperty(exportMeta, 'namespace', {
|
||||
get: function () {function get() {return namespace.resolveImport(nsource);}return get;}() }));
|
||||
|
||||
return;
|
||||
case 'ExportAllDeclaration':
|
||||
exportMap.namespace.set(specifier.exported.name || specifier.exported.value, namespace.add(exportMeta, specifier.source.value));
|
||||
return;
|
||||
case 'ExportSpecifier':
|
||||
if (!astNode.source) {
|
||||
exportMap.namespace.set(specifier.exported.name || specifier.exported.value, namespace.add(exportMeta, specifier.local));
|
||||
return;
|
||||
}
|
||||
// else falls through
|
||||
default:
|
||||
local = specifier.local.name;
|
||||
break;}
|
||||
|
||||
|
||||
// todo: JSDoc
|
||||
exportMap.reexports.set(specifier.exported.name, { local: local, getImport: function () {function getImport() {return namespace.resolveImport(nsource);}return getImport;}() });
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leHBvcnRNYXAvc3BlY2lmaWVyLmpzIl0sIm5hbWVzIjpbInByb2Nlc3NTcGVjaWZpZXIiLCJzcGVjaWZpZXIiLCJhc3ROb2RlIiwiZXhwb3J0TWFwIiwibmFtZXNwYWNlIiwibnNvdXJjZSIsInNvdXJjZSIsInZhbHVlIiwiZXhwb3J0TWV0YSIsImxvY2FsIiwidHlwZSIsInNldCIsImV4cG9ydGVkIiwibmFtZSIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZ2V0IiwicmVzb2x2ZUltcG9ydCIsImFkZCIsInJl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-plugin-import/lib/exportMap/typescript.js
generated
vendored
Normal file
44
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/typescript.js
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
isEsModuleInterop = isEsModuleInterop;var _path = require('path');var _tsconfigLoader = require('tsconfig-paths/lib/tsconfig-loader');var _hash = require('eslint-module-utils/hash');var ts = void 0;var tsconfigCache = new Map();function readTsConfig(context) {var tsconfigInfo = (0, _tsconfigLoader.tsConfigLoader)({ cwd: context.parserOptions && context.parserOptions.tsconfigRootDir || process.cwd(), getEnv: function () {function getEnv(key) {return process.env[key];}return getEnv;}() });try {if (tsconfigInfo.tsConfigPath !== undefined) {// Projects not using TypeScript won't have `typescript` installed.
|
||||
if (!ts) {ts = require('typescript');} // eslint-disable-line import/no-extraneous-dependencies
|
||||
var configFile = ts.readConfigFile(tsconfigInfo.tsConfigPath, ts.sys.readFile);return ts.parseJsonConfigFileContent(configFile.config, ts.sys, (0, _path.dirname)(tsconfigInfo.tsConfigPath));}} catch (e) {// Catch any errors
|
||||
}return null;}function isEsModuleInterop(context) {var cacheKey = (0, _hash.hashObject)({ tsconfigRootDir: context.parserOptions && context.parserOptions.tsconfigRootDir }).digest('hex');
|
||||
var tsConfig = tsconfigCache.get(cacheKey);
|
||||
if (typeof tsConfig === 'undefined') {
|
||||
tsConfig = readTsConfig(context);
|
||||
tsconfigCache.set(cacheKey, tsConfig);
|
||||
}
|
||||
|
||||
return tsConfig && tsConfig.options ? tsConfig.options.esModuleInterop : false;
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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Y29uZmlnLFxuICAgICAgICB0cy5zeXMsXG4gICAgICAgIGRpcm5hbWUodHNjb25maWdJbmZvLnRzQ29uZmlnUGF0aCksXG4gICAgICApO1xuICAgIH1cbiAgfSBjYXRjaCAoZSkge1xuICAgIC8vIENhdGNoIGFueSBlcnJvcnNcbiAgfVxuXG4gIHJldHVybiBudWxsO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNFc01vZHVsZUludGVyb3AoY29udGV4dCkge1xuICBjb25zdCBjYWNoZUtleSA9IGhhc2hPYmplY3Qoe1xuICAgIHRzY29uZmlnUm9vdERpcjogY29udGV4dC5wYXJzZXJPcHRpb25zICYmIGNvbnRleHQucGFyc2VyT3B0aW9ucy50c2NvbmZpZ1Jvb3REaXIsXG4gIH0pLmRpZ2VzdCgnaGV4Jyk7XG4gIGxldCB0c0NvbmZpZyA9IHRzY29uZmlnQ2FjaGUuZ2V0KGNhY2hlS2V5KTtcbiAgaWYgKHR5cGVvZiB0c0NvbmZpZyA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICB0c0NvbmZpZyA9IHJlYWRUc0NvbmZpZyhjb250ZXh0KTtcbiAgICB0c2NvbmZpZ0NhY2hlLnNldChjYWNoZUtleSwgdHNDb25maWcpO1xuICB9XG5cbiAgcmV0dXJuIHRzQ29uZmlnICYmIHRzQ29uZmlnLm9wdGlvbnMgPyB0c0NvbmZpZy5vcHRpb25zLmVzTW9kdWxlSW50ZXJvcCA6IGZhbHNlO1xufVxuIl19
|
||||
171
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/visitor.js
generated
vendored
Normal file
171
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/exportMap/visitor.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/importDeclaration.js
generated
vendored
Normal file
7
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/importDeclaration.js
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports['default'] =
|
||||
|
||||
importDeclaration;var _contextCompat = require('eslint-module-utils/contextCompat');function importDeclaration(context, node) {
|
||||
var ancestors = (0, _contextCompat.getAncestors)(context, node);
|
||||
return ancestors[ancestors.length - 1];
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbXBvcnREZWNsYXJhdGlvbi5qcyJdLCJuYW1lcyI6WyJpbXBvcnREZWNsYXJhdGlvbiIsImNvbnRleHQiLCJub2RlIiwiYW5jZXN0b3JzIiwibGVuZ3RoIl0sIm1hcHBpbmdzIjoiOztBQUV3QkEsaUIsQ0FGeEIsa0VBRWUsU0FBU0EsaUJBQVQsQ0FBMkJDLE9BQTNCLEVBQW9DQyxJQUFwQyxFQUEwQztBQUN2RCxNQUFNQyxZQUFZLGlDQUFhRixPQUFiLEVBQXNCQyxJQUF0QixDQUFsQjtBQUNBLFNBQU9DLFVBQVVBLFVBQVVDLE1BQVYsR0FBbUIsQ0FBN0IsQ0FBUDtBQUNEIiwiZmlsZSI6ImltcG9ydERlY2xhcmF0aW9uLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZ2V0QW5jZXN0b3JzIH0gZnJvbSAnZXNsaW50LW1vZHVsZS11dGlscy9jb250ZXh0Q29tcGF0JztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gaW1wb3J0RGVjbGFyYXRpb24oY29udGV4dCwgbm9kZSkge1xuICBjb25zdCBhbmNlc3RvcnMgPSBnZXRBbmNlc3RvcnMoY29udGV4dCwgbm9kZSk7XG4gIHJldHVybiBhbmNlc3RvcnNbYW5jZXN0b3JzLmxlbmd0aCAtIDFdO1xufVxuIl19
|
||||
102
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/index.js
generated
vendored
Normal file
102
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
238
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js
generated
vendored
Normal file
238
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
40
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/default.js
generated
vendored
Normal file
40
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/default.js
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
'use strict';var _builder = require('../exportMap/builder');var _builder2 = _interopRequireDefault(_builder);
|
||||
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: 'problem',
|
||||
docs: {
|
||||
category: 'Static analysis',
|
||||
description: 'Ensure a default export is present, given a default import.',
|
||||
url: (0, _docsUrl2['default'])('default') },
|
||||
|
||||
schema: [] },
|
||||
|
||||
|
||||
create: function () {function create(context) {
|
||||
function checkDefault(specifierType, node) {
|
||||
var defaultSpecifier = node.specifiers.find(
|
||||
function (specifier) {return specifier.type === specifierType;});
|
||||
|
||||
|
||||
if (!defaultSpecifier) {return;}
|
||||
var imports = _builder2['default'].get(node.source.value, context);
|
||||
if (imports == null) {return;}
|
||||
|
||||
if (imports.errors.length) {
|
||||
imports.reportErrors(context, node);
|
||||
} else if (imports.get('default') === undefined) {
|
||||
context.report({
|
||||
node: defaultSpecifier,
|
||||
message: 'No default export found in imported module "' + String(node.source.value) + '".' });
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
ImportDeclaration: checkDefault.bind(null, 'ImportDefaultSpecifier'),
|
||||
ExportNamedDeclaration: checkDefault.bind(null, 'ExportDefaultSpecifier') };
|
||||
|
||||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iAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgSW1wb3J0RGVjbGFyYXRpb246IGNoZWNrRGVmYXVsdC5iaW5kKG51bGwsICdJbXBvcnREZWZhdWx0U3BlY2lmaWVyJyksXG4gICAgICBFeHBvcnROYW1lZERlY2xhcmF0aW9uOiBjaGVja0RlZmF1bHQuYmluZChudWxsLCAnRXhwb3J0RGVmYXVsdFNwZWNpZmllcicpLFxuICAgIH07XG4gIH0sXG59O1xuIl19
|
||||
172
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js
generated
vendored
Normal file
172
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
235
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/export.js
generated
vendored
Normal file
235
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/export.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
40
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/exports-last.js
generated
vendored
Normal file
40
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/exports-last.js
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
'use strict';var _arrayPrototype = require('array.prototype.findlastindex');var _arrayPrototype2 = _interopRequireDefault(_arrayPrototype);
|
||||
|
||||
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
|
||||
|
||||
function isNonExportStatement(_ref) {var type = _ref.type;
|
||||
return type !== 'ExportDefaultDeclaration' &&
|
||||
type !== 'ExportNamedDeclaration' &&
|
||||
type !== 'ExportAllDeclaration';
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: 'suggestion',
|
||||
docs: {
|
||||
category: 'Style guide',
|
||||
description: 'Ensure all exports appear after other statements.',
|
||||
url: (0, _docsUrl2['default'])('exports-last') },
|
||||
|
||||
schema: [] },
|
||||
|
||||
|
||||
create: function () {function create(context) {
|
||||
return {
|
||||
Program: function () {function Program(_ref2) {var body = _ref2.body;
|
||||
var lastNonExportStatementIndex = (0, _arrayPrototype2['default'])(body, isNonExportStatement);
|
||||
|
||||
if (lastNonExportStatementIndex !== -1) {
|
||||
body.slice(0, lastNonExportStatementIndex).forEach(function (node) {
|
||||
if (!isNonExportStatement(node)) {
|
||||
context.report({
|
||||
node: node,
|
||||
message: 'Export statements should appear at the end of the file' });
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}return Program;}() };
|
||||
|
||||
}return create;}() };
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9leHBvcnRzLWxhc3QuanMiXSwibmFtZXMiOlsiaXNOb25FeHBvcnRTdGF0ZW1lbnQiLCJ0eXBlIiwibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJkb2NzIiwiY2F0ZWdvcnkiLCJkZXNjcmlwdGlvbiIsInVybCIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJQcm9ncmFtIiwiYm9keSIsImxhc3ROb25FeHBvcnRTdGF0ZW1lbnRJbmRleCIsInNsaWNlIiwiZm9yRWFjaCIsIm5vZGUiLCJyZXBvcnQiLCJtZXNzYWdlIl0sIm1hcHBpbmdzIjoiYUFBQSwrRDs7QUFFQSxxQzs7QUFFQSxTQUFTQSxvQkFBVCxPQUF3QyxLQUFSQyxJQUFRLFFBQVJBLElBQVE7QUFDdEMsU0FBT0EsU0FBUywwQkFBVDtBQUNGQSxXQUFTLHdCQURQO0FBRUZBLFdBQVMsc0JBRmQ7QUFHRDs7QUFFREMsT0FBT0MsT0FBUCxHQUFpQjtBQUNmQyxRQUFNO0FBQ0pILFVBQU0sWUFERjtBQUVKSSxVQUFNO0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node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/extensions.js
generated
vendored
Normal file
198
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/extensions.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
146
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/first.js
generated
vendored
Normal file
146
node_modules/eslint-plugin-github/node_modules/eslint-plugin-import/lib/rules/first.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue