Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prettier/tslint-config-prettier
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.7.0
Choose a base ref
...
head repository: prettier/tslint-config-prettier
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.8.0
Choose a head ref
  • 9 commits
  • 10 files changed
  • 3 contributors

Commits on Feb 5, 2018

  1. chore(package): update tslint-consistent-codestyle to version 1.11.1 (#…

    …98)
    
    * chore(package): update tslint-consistent-codestyle to version 1.11.1
    
    * chore(package): update lockfile
    
    https://npm.im/greenkeeper-lockfile
    greenkeeper[bot] authored and ikatyang committed Feb 5, 2018
    Copy the full SHA
    262c813 View commit details

Commits on Feb 13, 2018

  1. chore(package): update tslint-react to version 3.5.0 (#99)

    * chore(package): update tslint-react to version 3.5.0
    
    * chore(package): update lockfile
    
    https://npm.im/greenkeeper-lockfile
    greenkeeper[bot] authored and ikatyang committed Feb 13, 2018
    Copy the full SHA
    15b088d View commit details

Commits on Feb 14, 2018

  1. chore(package): update tslint-react to version 3.5.1 (#100)

    * chore(package): update tslint-react to version 3.5.1
    
    * chore(package): update lockfile
    
    https://npm.im/greenkeeper-lockfile
    greenkeeper[bot] authored and ikatyang committed Feb 14, 2018
    Copy the full SHA
    9325b64 View commit details
  2. chore(package): update tslint-microsoft-contrib to version 5.0.3 (#101)

    * chore(package): update tslint-microsoft-contrib to version 5.0.3
    
    * chore(package): update lockfile
    
    https://npm.im/greenkeeper-lockfile
    greenkeeper[bot] authored and ikatyang committed Feb 14, 2018
    Copy the full SHA
    d8387b2 View commit details

Commits on Feb 15, 2018

  1. chore(package): update tslint-eslint-rules to version 5.0.0 (#102)

    * chore(package): update tslint-eslint-rules to version 5.0.0
    
    * chore(package): update lockfile
    
    https://npm.im/greenkeeper-lockfile
    greenkeeper[bot] authored and ikatyang committed Feb 15, 2018
    Copy the full SHA
    6738595 View commit details
  2. test: load prettierrc

    ikatyang committed Feb 15, 2018
    Copy the full SHA
    740926c View commit details
  3. Copy the full SHA
    6e60ff6 View commit details
  4. test: map coverage

    ikatyang committed Feb 15, 2018
    Copy the full SHA
    cefedcc View commit details
  5. Merge pull request #103 from alexjoverm/feat/tslint-eslint-rules/ter-…

    …no-tabs
    
    feat(rules): add tslint-eslint-rules/ter-no-tabs
    alexjoverm authored Feb 15, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b6b1b86 View commit details
112 changes: 60 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@
"@types/jest": "^22.0.0",
"@types/make-dir": "^1.0.1",
"@types/node": "^9.3.0",
"@types/prettier": "^1.5.0",
"@types/prettier": "^1.10.0",
"codelyzer": "4.1.0",
"commitizen": "^2.9.5",
"cz-conventional-changelog": "^2.0.0",
@@ -93,14 +93,14 @@
"semantic-release": "^8.0.0",
"ts-jest": "^22.0.0",
"tslint": "5.9.1",
"tslint-consistent-codestyle": "1.11.0",
"tslint-consistent-codestyle": "1.11.1",
"tslint-divid": "1.3.0",
"tslint-eslint-rules": "4.1.1",
"tslint-eslint-rules": "5.0.0",
"tslint-immutable": "4.5.1",
"tslint-microsoft-contrib": "5.0.2",
"tslint-microsoft-contrib": "5.0.3",
"tslint-misc-rules": "3.2.1",
"tslint-plugin-ikatyang": "1.1.1",
"tslint-react": "3.4.0",
"tslint-react": "3.5.1",
"typescript": "2.6.2",
"validate-commit-msg": "^2.10.1",
"vrsource-tslint-rules": "5.8.0"
1 change: 1 addition & 0 deletions src/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions src/tslint-eslint-rules/ter-no-tabs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"useTabs": true
}
29 changes: 29 additions & 0 deletions src/tslint-eslint-rules/ter-no-tabs/__snapshots__/test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`should affect error message after formatting 1`] = `
"
<<<<<< before
no error
======
ERROR: (ter-no-tabs) /src/tslint-eslint-rules/ter-no-tabs/test.ts[2, 1]: Unexpected tab character.
>>>>>> after
"
`;
exports[`should be pretty after formatting 1`] = `
"
<<<<<< before
if (true) {
// <--- this indentation
}
======
if (true) {
// <--- this indentation
}
>>>>>> after
"
`;
3 changes: 3 additions & 0 deletions src/tslint-eslint-rules/ter-no-tabs/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if (true) {
// <--- this indentation
}
6 changes: 6 additions & 0 deletions src/tslint-eslint-rules/ter-no-tabs/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../tslint.json",
"rules": {
"ter-no-tabs": true
}
}
6 changes: 3 additions & 3 deletions tools/runtime.ts
Original file line number Diff line number Diff line change
@@ -3,15 +3,15 @@ import * as prettier from "prettier";
import * as tslint from "tslint";

export function format(filename: string, source: string) {
return prettier.format(source, { filepath: filename });
const options = prettier.resolveConfig.sync(filename, { editorconfig: false });
return prettier.format(source, { filepath: filename, ...options });
}

export function lint(filename: string, source: string) {
const dirname = path.dirname(filename);

const tslintPath = path.join(dirname, "tslint.json");
const tslintConfig = tslint.Linter.findConfiguration(tslintPath, "")
.results;
const tslintConfig = tslint.Linter.findConfiguration(tslintPath, "").results;
const linter = new tslint.Linter({ fix: false, formatter: "verbose" });

linter.lint(filename, source, tslintConfig);
3 changes: 2 additions & 1 deletion tsconfig.checker.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
"extends": "./tsconfig.json",
"include": ["tools/checker.ts"],
"compilerOptions": {
"outDir": "lib"
"outDir": "lib",
"inlineSourceMap": false
}
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -4,7 +4,8 @@
"lib": ["es6"],
"module": "commonjs",
"rootDir": "tools",
"outDir": "build"
"outDir": "build",
"inlineSourceMap": true
},
"include": ["tools/**/*.ts"]
}