chore: add cSpell for spell checking (#6456)

* chore: Add cSpell for spell checking

* chore: exclude map files and remove dups

* chore: exclude more binary files

* chore: remove MD headings

* Update .cspell.json

* fix a few spellings

* fix more

* fix

Signed-off-by: Joshua Chen <sidachen2003@gmail.com>

* fix a few

* oops

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
Nick Schonning 2022-01-24 20:40:02 -05:00 committed by GitHub
parent a41a5c328c
commit 521eb119a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 852 additions and 142 deletions

View file

@ -165,7 +165,7 @@ export default function transformer(file: string): string {
return root.toSource();
}
function getDefaultImportDeclarators(rootAst: Collection) {
function getDefaultImportDeclarations(rootAst: Collection) {
// var ... = require('y')
return rootAst
.find(VariableDeclarator, {
@ -178,7 +178,7 @@ function getDefaultImportDeclarators(rootAst: Collection) {
.filter((variableDeclarator) => !!variableDeclarator.value);
}
function getNamedImportDeclarators(rootAst: Collection) {
function getNamedImportDeclarations(rootAst: Collection) {
// var ... = require('y').x
return rootAst.find(VariableDeclarator, {
init: {
@ -192,9 +192,9 @@ function getNamedImportDeclarators(rootAst: Collection) {
}
function getImportDeclaratorPaths(variableDeclaration: Collection) {
const defaultImports = getDefaultImportDeclarators(variableDeclaration);
const defaultImports = getDefaultImportDeclarations(variableDeclaration);
const namedImports = getNamedImportDeclarators(variableDeclaration);
const namedImports = getNamedImportDeclarations(variableDeclaration);
return [...defaultImports.paths(), ...namedImports.paths()];
}