Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add package scope-manager#1939

New issue

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

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

Already on GitHub?Sign in to your account

Merged
bradzacher merged 1 commit intomasterfromscope-analysis
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion.cspell.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,8 @@
"**/*.{json,snap}",
".cspell.json",
"yarn.lock",
".github/workflows/**"
".github/workflows/**",
".vscode/*.json"
],
"dictionaries": [
"typescript",
Expand DownExpand Up@@ -57,6 +58,7 @@
"ESLint",
"ESLint's",
"espree",
"esrecurse",
"estree",
"IDE's",
"IIFE",
Expand All@@ -75,11 +77,13 @@
"Premade",
"prettier's",
"recurse",
"redeclared",
"reimplement",
"resync",
"ROADMAP",
"ruleset",
"rulesets",
"serializers",
"superset",
"thenables",
"transpiles",
Expand Down
18 changes: 18 additions & 0 deletions.eslintrc.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,6 +55,11 @@ module.exports = {
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/no-unused-vars': [
'warn',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
],

// TODO - enable these new recommended rules
'@typescript-eslint/no-floating-promises': 'off',
Expand DownExpand Up@@ -224,5 +229,18 @@ module.exports = {
'no-console': 'off',
},
},
// generated files
{
files: [
'packages/scope-manager/src/lib/*.ts',
'packages/eslint-plugin/src/configs/*.ts',
],
rules: {
// allow console logs in tools and tests
'@typescript-eslint/internal/no-poorly-typed-ts-props': 'off',
'@typescript-eslint/internal/no-typescript-default-import': 'off',
'@typescript-eslint/internal/prefer-ast-types-enum': 'off',
},
},
],
};
14 changes: 12 additions & 2 deletions.github/workflows/ci.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,8 +4,6 @@ on:
push:
branches:
- master
# TODO - delete this before merging v3 into master
- v3
pull_request:
branches:
- '**'
Expand DownExpand Up@@ -103,6 +101,12 @@ jobs:
env:
CI: true

- name: Run unit tests for scope-manager
run: yarn test
working-directory: packages/scope-manager
env:
CI: true

- name: Run unit tests for experimental-utils
run: yarn test
working-directory: packages/experimental-utils
Expand DownExpand Up@@ -269,6 +273,12 @@ jobs:
env:
CI: true

- name: Run unit tests for scope-manager
run: yarn test
working-directory: packages/scope-manager
env:
CI: true

- name: Run unit tests for experimental-utils
run: yarn test
working-directory: packages/experimental-utils
Expand Down
1 change: 1 addition & 0 deletions.prettierignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
**/tests/fixtures/**/*
!packages/scope-manager/tests/fixtures/**/*
**/tests/fixture-project/**/*
**/dist
**/coverage
Expand Down
5 changes: 3 additions & 2 deletions.vscode/extensions.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker",
"davidanson.vscode-markdownlint"
"tlent.jest-snapshot-language-support"
],
"unwantedRecommendations": ["hookyqr.beautify", "dbaeumer.jshint"]
}
44 changes: 43 additions & 1 deletion.vscode/launch.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,6 +32,8 @@
"${workspaceFolder}/packages/types/dist/index.js",
"${workspaceFolder}/packages/visitor-keys/src/index.ts",
"${workspaceFolder}/packages/visitor-keys/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
],
},
{
Expand DownExpand Up@@ -62,6 +64,8 @@
"${workspaceFolder}/packages/types/dist/index.js",
"${workspaceFolder}/packages/visitor-keys/src/index.ts",
"${workspaceFolder}/packages/visitor-keys/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
],
},
{
Expand DownExpand Up@@ -92,6 +96,8 @@
"${workspaceFolder}/packages/types/dist/index.js",
"${workspaceFolder}/packages/visitor-keys/src/index.ts",
"${workspaceFolder}/packages/visitor-keys/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
],
},
{
Expand DownExpand Up@@ -122,6 +128,8 @@
"${workspaceFolder}/packages/types/dist/index.js",
"${workspaceFolder}/packages/visitor-keys/src/index.ts",
"${workspaceFolder}/packages/visitor-keys/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
],
},
{
Expand DownExpand Up@@ -152,7 +160,41 @@
"${workspaceFolder}/packages/types/dist/index.js",
"${workspaceFolder}/packages/visitor-keys/src/index.ts",
"${workspaceFolder}/packages/visitor-keys/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
],
}
},
{
"type": "node",
"request": "launch",
"name": "Run currently opened scope-manager test",
"cwd": "${workspaceFolder}/packages/scope-manager/",
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
"args": [
"--runInBand",
"--no-cache",
"--no-coverage",
"${fileBasename}"
],
"sourceMaps": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"skipFiles": [
"${workspaceFolder}/packages/experimental-utils/src/index.ts",
"${workspaceFolder}/packages/experimental-utils/dist/index.js",
"${workspaceFolder}/packages/experimental-utils/src/ts-estree.ts",
"${workspaceFolder}/packages/experimental-utils/dist/ts-estree.js",
"${workspaceFolder}/packages/parser/src/index.ts",
"${workspaceFolder}/packages/parser/dist/index.js",
"${workspaceFolder}/packages/typescript-estree/src/index.ts",
"${workspaceFolder}/packages/typescript-estree/dist/index.js",
"${workspaceFolder}/packages/types/src/index.ts",
"${workspaceFolder}/packages/types/dist/index.js",
"${workspaceFolder}/packages/visitor-keys/src/index.ts",
"${workspaceFolder}/packages/visitor-keys/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
"${workspaceFolder}/packages/scope-manager/dist/index.js",
],
},
]
}
17 changes: 17 additions & 0 deletions.vscode/settings.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,4 +18,21 @@
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single",
"editor.defaultFormatter": "esbenp.prettier-vscode",

// make the .shot files from jest-specific-snapshot act like normal snapshots
"files.associations": {
"*.shot": "jest-snapshot"
},
"vsicons.associations.files": [
{
"icon": "jest_snapshot",
"extensions": [
".ts.shot",
".tsx.shot",
".js.shot",
".jsx.shot",
],
"extends": "jest_snapshot"
},
],
}
1 change: 1 addition & 0 deletionspackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -72,6 +72,7 @@
"@types/jest": "^25.2.1",
"@types/node": "^13.13.5",
"@types/prettier": "^2.0.0",
"@types/rimraf": "^3.0.0",
"all-contributors-cli": "^6.14.2",
"cspell": "^4.0.61",
"cz-conventional-changelog": "^3.2.0",
Expand Down
2 changes: 2 additions & 0 deletionspackages/eslint-plugin-internal/jest.config.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
'use strict';

// @ts-check
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
globals: {
'ts-jest': {
Expand Down
2 changes: 2 additions & 0 deletionspackages/eslint-plugin-tslint/jest.config.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
'use strict';

// @ts-check
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
globals: {
'ts-jest': {
Expand Down
2 changes: 2 additions & 0 deletionspackages/eslint-plugin/jest.config.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
'use strict';

// @ts-check
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
globals: {
'ts-jest': {
Expand Down
4 changes: 4 additions & 0 deletionspackages/eslint-plugin/src/configs/all.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// YOU CAN REGENERATE IT USING yarn generate:configs

export = {
extends: ['./configs/base', './configs/eslint-recommended'],
rules: {
Expand Down
4 changes: 4 additions & 0 deletionspackages/eslint-plugin/src/configs/base.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// YOU CAN REGENERATE IT USING yarn generate:configs

export = {
parser: '@typescript-eslint/parser',
parserOptions: { sourceType: 'module' },
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// YOU CAN REGENERATE IT USING yarn generate:configs

export = {
extends: ['./configs/base', './configs/eslint-recommended'],
rules: {
Expand Down
4 changes: 4 additions & 0 deletionspackages/eslint-plugin/src/configs/recommended.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// YOU CAN REGENERATE IT USING yarn generate:configs

export = {
extends: ['./configs/base', './configs/eslint-recommended'],
rules: {
Expand Down
13 changes: 12 additions & 1 deletionpackages/eslint-plugin/tools/generate-configs.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,6 +5,16 @@ import path from 'path';
import { format, resolveConfig } from 'prettier';
import rules from '../src/rules';

function addAutoGeneratedComment(code: string): string {
return [
'// THIS CODE WAS AUTOMATICALLY GENERATED',
'// DO NOT EDIT THIS CODE BY HAND',
'// YOU CAN REGENERATE IT USING yarn generate:configs',
'',
code,
].join('\n');
}

const prettierConfig = resolveConfig.sync(__dirname);

interface LinterConfigRules {
Expand DownExpand Up@@ -117,8 +127,9 @@ function reducer<TMessageIds extends string>(
* Helper function writes configuration.
*/
function writeConfig(config: LinterConfig, filePath: string): void {
// note: we use `export =` because ESLint will import these configs via a commonjs import
const code = `export = ${JSON.stringify(config)};`;
const configStr = format(code, {
const configStr = format(addAutoGeneratedComment(code), {
parser: 'typescript',
...prettierConfig,
});
Expand Down
2 changes: 2 additions & 0 deletionspackages/experimental-utils/jest.config.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
'use strict';

// @ts-check
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
globals: {
'ts-jest': {
Expand Down
21 changes: 21 additions & 0 deletionspackages/scope-manager/LICENSE
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 TypeScript ESLint and other contributors

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.
Loading

[8]ページ先頭

©2009-2025 Movatter.jp