Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tslint-to-eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tslint-to-eslint-config - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

.eslintrc.json

3

.eslintrc.js

@@ -20,2 +20,3 @@ module.exports = {

"default-case": 0,
"guard-for-in": 0,
"import/no-extraneous-dependencies": [

@@ -26,3 +27,2 @@ "error",

"import/first": 0,
"import/newline-after-import": 0,
"import/no-unresolved": 0,

@@ -34,2 +34,3 @@ "import/prefer-default-export": 0,

"no-restricted-syntax": 0,
"no-param-reassign": 0,
"no-shadow": 0,

@@ -36,0 +37,0 @@ "no-undef": 0,

@@ -0,0 +0,0 @@ # Contributor Covenant Code of Conduct

@@ -7,3 +7,4 @@ {

},
"prettier.ignorePath": ".prettierignore",
"typescript.tsdk": "node_modules/typescript/lib"
}
module.exports = {
presets: [["@babel/preset-env", { targets: { node: "current" } }], "@babel/preset-typescript"],
};

@@ -20,30 +20,7 @@ # Development

Compile with `npm run tsc` and run tests with `npm run test`.
Compile with `npm run tsc` and run tests with `npm run test:unit`.
### CLI Architecture
## More Reading
- CLI usage starts in `bin/tslint-to-eslint-config`, which immediately calls `src/cli/main.ts`.
- CLI settings are parsed and read in `src/cli/runCli.ts`.
- Application logic is run by `src/conversion/convertConfig.ts`.
### Dependencies
Methods are created using a variant of [Dependency Injection](http://en.wikipedia.org/wiki/Dependency_Injection).
Any method with dependencies that should be stubbed out during tests, such as file system bindings, logging, or other methods,
takes in a first argument of name `dependencies`.
Its dependencies object is manually created in `src/cli/main.ts` and bound to the method with `bind`.
### Unit Tests
Each `src/**/*.ts` source file should have an equivalent `*.test.ts` next to it.
Tests should include comments above each section of the "AAA" testing format:
- `// Arrange`: Set up dependencies for the code under test
- `// Act`: Perform the logic under test
- `// Assert`: Check the results of the acted logic
`tslint-to-eslint-config` requires 100% unit test coverage, excluding the following:
- `src/cli/main.ts`
- `src/adapters/*.ts`
- `src/**/*.stubs.ts`
- [Architecture](./Architecture.md)
- [Testing](./Testing.md)

@@ -20,4 +20,4 @@ module.exports = {

moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
testRegex: "((\\.|/)test)\\.tsx?$",
testRegex: "src(.*)\\.test\\.tsx?$",
testEnvironment: "node",
};

@@ -0,0 +0,0 @@ MIT License

@@ -15,7 +15,7 @@ {

"devDependencies": {
"@babel/core": "7.4.5",
"@babel/preset-env": "7.4.5",
"@babel/core": "7.5.0",
"@babel/preset-env": "7.5.0",
"@babel/preset-typescript": "7.3.3",
"@types/jest": "24.0.15",
"@types/node": "12.0.10",
"@types/node": "12.0.12",
"@typescript-eslint/eslint-plugin": "1.11.0",

@@ -25,9 +25,9 @@ "@typescript-eslint/parser": "1.11.0",

"eslint": "6.0.1",
"eslint-config-airbnb": "17.1.0",
"eslint-config-airbnb-base": "13.1.0",
"eslint-config-airbnb": "17.1.1",
"eslint-config-airbnb-base": "13.2.0",
"eslint-config-prettier": "6.0.0",
"eslint-plugin-import": "2.18.0",
"husky": "2.7.0",
"husky": "3.0.0",
"jest": "24.8.0",
"lint-staged": "8.2.1",
"lint-staged": "9.0.2",
"prettier": "1.18.2",

@@ -64,8 +64,10 @@ "strip-ansi": "5.2.0",

"eslint": "eslint \"./src/*.ts\" \"./src/**/*.ts\" --report-unused-disable-directives",
"prettier": "prettier \"./src/*.{js,json,ts,xml,yaml}\" \"./src/**/*.{js,json,ts,xml,yaml}\"",
"prettier": "prettier \"./src/*.{js,json,ts,xml,yaml}\" \"./src/**/*.{js,json,ts,xml,yaml}\" --ignore-path .prettierignore",
"prettier:write": "npm run prettier -- --write",
"test": "jest",
"test:unit": "jest",
"test:end-to-end": "jest --config=test/jest.config.js",
"test:end-to-end:accept": "jest --config=test/jest.config.js --globals=\"{\\\"acceptTestChanges\\\": true }\"",
"tsc": "tsc"
},
"version": "0.1.7"
"version": "0.1.8"
}
# tslint-to-eslint-config
![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-14cc21.svg)
![Coverage: 100%](https://img.shields.io/badge/coverage-100%25-14cc21.svg)
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-e72163.svg)](https://prettier.io)
![Coverage: 100%](https://img.shields.io/badge/coverage-100%25-orange.svg)
![TypeScript: Strict](https://img.shields.io/badge/typescript-strict-yellow.svg)
[![NPM version](https://badge.fury.io/js/tslint-to-eslint-config.svg)](http://badge.fury.io/js/tslint-to-eslint-config)
[![Circle CI](https://img.shields.io/circleci/build/github/JoshuaKGoldberg/tslint-to-eslint-config.svg)](https://circleci.com/gh/JoshuaKGoldberg/tslint-to-eslint-config)
[![Join the chat at https://gitter.im/tslint-to-eslint-config/community](https://badges.gitter.im/tslint-to-eslint-config/community.svg)](https://gitter.im/tslint-to-eslint-config/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![NPM version](https://badge.fury.io/js/tslint-to-eslint-config.svg)](http://badge.fury.io/js/tslint-to-eslint-config)
![TypeScript: Strict](https://img.shields.io/badge/typescript-strict-14cc21.svg)
[![Join the chat at https://gitter.im/tslint-to-eslint-config/community](https://img.shields.io/badge/chat-gitter-informational.svg)](https://gitter.im/tslint-to-eslint-config/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Code Style: Prettier](https://img.shields.io/badge/speed-blazingly_fast-blueviolet.svg)](https://prettier.io)

@@ -38,6 +39,12 @@ Converts your TSLint configuration to the closest possible ESLint equivalent.

#### `eslint`
- **[`config`](#config)**: Path to print the generated ESLint configuration file to.
- **[`eslint`](#eslint)**: Path to an ESLint configuration file to read settings from.
- **[`package`](#package)**: Path to a package.json file to read dependencies from.
- **[`tslint`](#tslint)**: Path to a TSLint configuration file to read settings from.
- **[`typescript`](#typescript)**: Path to a TypeScript configuration file to read TypeScript compiler options from.
#### `config`
```shell
npx tslint-to-eslint-config --eslint ./path/to/seslintrc.json
npx tslint-to-eslint-config --config .eslintrc.json
```

@@ -47,4 +54,19 @@

Path to print the generated ESLint configuration file to.
The file extension of this path will be used to determine the format of the created file:
- `.js` file paths will be written `module.exports = ...` JavaScript
- Other file paths will default to JSON
#### `eslint`
```shell
npx tslint-to-eslint-config --eslint ./path/to/eslintrc.js
```
_Default: `--config`'s value_
Path to an ESLint configuration file to read settings from.
This isn't yet used for anything, but will eventually inform settings for the generated ESLint configuration file.
The generated ESLint configuration file will include any settings `import`ed from this file.

@@ -81,3 +103,3 @@ #### `package`

Path to a `tsconfig.json` file to read TypeScript compiler options from.
Path to a TypeScript configuration file to read TypeScript compiler options from.
This will help inform the generated ESLint configuration file's [env](https://eslint.org/docs/user-guide/configuring#specifying-parser-options) settings.

@@ -84,0 +106,0 @@

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc