Skip to content

Commit

Permalink
Merge branch 'master' into fix/3613
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed Aug 1, 2021
2 parents af42325 + 62bcc93 commit a9a6f2c
Show file tree
Hide file tree
Showing 108 changed files with 2,275 additions and 373 deletions.
10 changes: 7 additions & 3 deletions .eslintrc.js
Expand Up @@ -65,8 +65,6 @@ module.exports = {
],

// TODO - enable these new recommended rules
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
// TODO - enable this
'@typescript-eslint/naming-convention': 'off',
Expand Down Expand Up @@ -164,15 +162,19 @@ module.exports = {
// all test files
{
files: [
'packages/*/tests/**/*.test.ts',
'packages/*/tests/**/*.spec.ts',
'packages/*/tests/**/*.test.ts',
'packages/*/tests/**/spec.ts',
'packages/*/tests/**/test.ts',
'packages/parser/tests/**/*.ts',
],
env: {
'jest/globals': true,
},
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'eslint-plugin/no-identical-tests': 'error',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
Expand All @@ -198,6 +200,8 @@ module.exports = {
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
},
},
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26)

**Note:** Version bump only for package @typescript-eslint/typescript-eslint





## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19)

**Note:** Version bump only for package @typescript-eslint/typescript-eslint





## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12)

**Note:** Version bump only for package @typescript-eslint/typescript-eslint





## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05)

**Note:** Version bump only for package @typescript-eslint/typescript-eslint
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,5 +1,5 @@
{
"version": "4.28.2",
"version": "4.28.5",
"npmClient": "yarn",
"useWorkspaces": true,
"stream": true
Expand Down
51 changes: 11 additions & 40 deletions nx.json
@@ -1,14 +1,15 @@
{
"npmScope": "typescript-eslint",
"implicitDependencies": {
"workspace.json": "*",
"package.json": {
"dependencies": "*",
"devDependencies": "*"
},
"nx.json": "*",
".github/workflows/ci.yml": "*"
},
"affected": {
"defaultBase": "master"
},
"workspaceLayout": {
"libsDir": "packages"
},
Expand All @@ -17,50 +18,20 @@
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": ["build", "test", "package", "prepare"],
"strictlyOrderedTargets": ["build", "package", "prepare"],
"accessToken": "YjFjNTBhOWUtY2JmNy00ZDhiLWE5N2UtZjliNDAwNmIzOTdjfHJlYWQtd3JpdGU=",
"canTrackAnalytics": false,
"showUsageWarnings": true,
"runtimeCacheInputs": ["node -v"]
}
}
},
"projects": {
"@typescript-eslint/ast-spec": {
"implicitDependencies": []
},
"@typescript-eslint/eslint-plugin": {
"implicitDependencies": []
},
"@typescript-eslint/eslint-plugin-internal": {
"implicitDependencies": []
},
"@typescript-eslint/eslint-plugin-tslint": {
"implicitDependencies": []
},
"@typescript-eslint/experimental-utils": {
"implicitDependencies": []
},
"@typescript-eslint/parser": {
"implicitDependencies": []
},
"@typescript-eslint/scope-manager": {
"implicitDependencies": []
},
"@typescript-eslint/shared-fixtures": {
"implicitDependencies": []
},
"@typescript-eslint/types": {
"implicitDependencies": ["@typescript-eslint/ast-spec"]
},
"@typescript-eslint/typescript-estree": {
"implicitDependencies": []
},
"@typescript-eslint/visitor-keys": {
"implicitDependencies": []
}
"targetDependencies": {
"build": [
{
"target": "build",
"projects": "dependencies"
}
]
},
"affected": {
"defaultBase": "master"
}
"projects": {}
}
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -77,10 +77,10 @@
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@commitlint/config-lerna-scopes": "^12.1.4",
"@nrwl/cli": "^12.3.5",
"@nrwl/nx-cloud": "^12.1.3",
"@nrwl/tao": "^12.3.5",
"@nrwl/workspace": "^12.3.5",
"@nrwl/cli": "12.6.0",
"@nrwl/nx-cloud": "12.3.0",
"@nrwl/tao": "12.6.3",
"@nrwl/workspace": "12.6.0",
"@types/babel__code-frame": "^7.0.2",
"@types/debug": "^4.1.5",
"@types/eslint-visitor-keys": "^1.0.0",
Expand Down Expand Up @@ -115,7 +115,7 @@
"make-dir": "^3.1.0",
"markdownlint-cli": "^0.27.1",
"node-fetch": "^2.6.1",
"prettier": "^2.3.0",
"prettier": "2.3.2",
"pretty-format": "^27.0.2",
"rimraf": "^3.0.2",
"ts-jest": "^27.0.1",
Expand All @@ -127,6 +127,6 @@
"@types/node": "^15.6.1",
"jest-diff": "^27.0.0",
"pretty-format": "^27.0.0",
"typescript": "4.3.2"
"typescript": "4.3.5"
}
}
24 changes: 24 additions & 0 deletions packages/ast-spec/CHANGELOG.md
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.28.5](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.4...v4.28.5) (2021-07-26)

**Note:** Version bump only for package @typescript-eslint/ast-spec





## [4.28.4](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.3...v4.28.4) (2021-07-19)

**Note:** Version bump only for package @typescript-eslint/ast-spec





## [4.28.3](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.2...v4.28.3) (2021-07-12)

**Note:** Version bump only for package @typescript-eslint/ast-spec





## [4.28.2](https://github.com/typescript-eslint/typescript-eslint/compare/v4.28.1...v4.28.2) (2021-07-05)

**Note:** Version bump only for package @typescript-eslint/ast-spec
Expand Down
2 changes: 1 addition & 1 deletion packages/ast-spec/package.json
@@ -1,6 +1,6 @@
{
"name": "@typescript-eslint/ast-spec",
"version": "4.28.2",
"version": "4.28.5",
"description": "TypeScript-ESTree AST spec",
"private": true,
"keywords": [
Expand Down
5 changes: 5 additions & 0 deletions packages/ast-spec/project.json
@@ -0,0 +1,5 @@
{
"root": "packages/ast-spec",
"type": "library",
"implicitDependencies": []
}
21 changes: 7 additions & 14 deletions packages/ast-spec/src/base/BaseNode.ts
@@ -1,22 +1,15 @@
// import type { Node } from '../unions/Node';
import type { Range } from './Range';
import type { SourceLocation } from './SourceLocation';
import type { AST_NODE_TYPES } from '../ast-node-types';
import type { NodeOrTokenData } from './NodeOrTokenData';

export interface BaseNode {
/**
* The source location information of the node.
* @see {SourceLocation}
*/
loc: SourceLocation;
/**
* @see {Range}
*/
range: Range;
export interface BaseNode extends NodeOrTokenData {
/**
* The parent node of the current node
*
* This is added in the @typescript-eslint/types package as ESLint adds it
* while traversing.
*/
// parent?: Node;

// every node *will* have a type, but let the nodes define their own exact string
// type: string;
type: AST_NODE_TYPES;
}
6 changes: 4 additions & 2 deletions packages/ast-spec/src/base/BaseToken.ts
@@ -1,8 +1,10 @@
import type { BaseNode } from './BaseNode';
import type { AST_TOKEN_TYPES } from '../ast-token-types';
import type { NodeOrTokenData } from './NodeOrTokenData';

/*
* Token and Comment are pseudo-nodes to represent pieces of source code
*/
export interface BaseToken extends BaseNode {
export interface BaseToken extends NodeOrTokenData {
type: AST_TOKEN_TYPES;
value: string;
}
17 changes: 17 additions & 0 deletions packages/ast-spec/src/base/NodeOrTokenData.ts
@@ -0,0 +1,17 @@
import type { Range } from './Range';
import type { SourceLocation } from './SourceLocation';

export interface NodeOrTokenData {
/**
* The source location information of the node.
* @see {SourceLocation}
*/
loc: SourceLocation;

/**
* @see {Range}
*/
range: Range;

type: string;
}
Expand Up @@ -2,10 +2,11 @@ import type { AST_NODE_TYPES } from '../../ast-node-types';
import type { BaseNode } from '../../base/BaseNode';
import type { Identifier } from '../../expression/Identifier/spec';
import type { Expression } from '../../unions/Expression';
import type { ExportKind } from '../ExportAndImportKind';

export interface ExportAllDeclaration extends BaseNode {
type: AST_NODE_TYPES.ExportAllDeclaration;
source: Expression | null;
exportKind: 'type' | 'value';
exportKind: ExportKind;
exported: Identifier | null;
}
4 changes: 4 additions & 0 deletions packages/ast-spec/src/declaration/ExportAndImportKind.ts
@@ -0,0 +1,4 @@
type ExportAndImportKind = 'type' | 'value';

export type ExportKind = ExportAndImportKind;
export type ImportKind = ExportAndImportKind;
Expand Up @@ -2,9 +2,10 @@ import type { AST_NODE_TYPES } from '../../ast-node-types';
import type { BaseNode } from '../../base/BaseNode';
import type { ExportDeclaration } from '../../unions/ExportDeclaration';
import type { Expression } from '../../unions/Expression';
import type { ExportKind } from '../ExportAndImportKind';

export interface ExportDefaultDeclaration extends BaseNode {
type: AST_NODE_TYPES.ExportDefaultDeclaration;
declaration: ExportDeclaration | Expression;
exportKind: 'type' | 'value';
exportKind: ExportKind;
}
Expand Up @@ -3,11 +3,12 @@ import type { BaseNode } from '../../base/BaseNode';
import type { ExportSpecifier } from '../../special/ExportSpecifier/spec';
import type { ExportDeclaration } from '../../unions/ExportDeclaration';
import type { Expression } from '../../unions/Expression';
import type { ExportKind } from '../ExportAndImportKind';

export interface ExportNamedDeclaration extends BaseNode {
type: AST_NODE_TYPES.ExportNamedDeclaration;
declaration: ExportDeclaration | null;
specifiers: ExportSpecifier[];
source: Expression | null;
exportKind: 'type' | 'value';
exportKind: ExportKind;
}
3 changes: 2 additions & 1 deletion packages/ast-spec/src/declaration/ImportDeclaration/spec.ts
Expand Up @@ -2,10 +2,11 @@ import type { AST_NODE_TYPES } from '../../ast-node-types';
import type { BaseNode } from '../../base/BaseNode';
import type { ImportClause } from '../../unions/ImportClause';
import type { Literal } from '../../unions/Literal';
import type { ImportKind } from '../ExportAndImportKind';

export interface ImportDeclaration extends BaseNode {
type: AST_NODE_TYPES.ImportDeclaration;
source: Literal;
specifiers: ImportClause[];
importKind: 'type' | 'value';
importKind: ImportKind;
}
Expand Up @@ -3,11 +3,12 @@ import type { BaseNode } from '../../base/BaseNode';
import type { Identifier } from '../../expression/Identifier/spec';
import type { TSExternalModuleReference } from '../../special/TSExternalModuleReference/spec';
import type { EntityName } from '../../unions/EntityName';
import type { ImportKind } from '../ExportAndImportKind';

export interface TSImportEqualsDeclaration extends BaseNode {
type: AST_NODE_TYPES.TSImportEqualsDeclaration;
id: Identifier;
moduleReference: EntityName | TSExternalModuleReference;
importKind: 'type' | 'value';
importKind: ImportKind;
isExport: boolean;
}
2 changes: 1 addition & 1 deletion packages/ast-spec/src/index.ts
@@ -1,7 +1,7 @@
export * from './base/Accessibility';
export * from './base/BaseNode'; // this is exported so that the `types` package can merge the decl and add the `parent` property
export * from './base/OptionalRangeAndLoc';
export * from './base/LineAndColumnData';
export * from './base/OptionalRangeAndLoc';
export * from './base/Range';
export * from './base/SourceLocation';

Expand Down

0 comments on commit a9a6f2c

Please sign in to comment.