Skip to content

Commit

Permalink
Merge pull request #57 from Codecademy/jg-bump-all-to-latest
Browse files Browse the repository at this point in the history
Bumped all formatting and linting packages to latest
  • Loading branch information
Josh Goldberg committed May 24, 2020
2 parents f07bbaa + d803f80 commit e67a0c1
Show file tree
Hide file tree
Showing 10 changed files with 856 additions and 307 deletions.
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
env: {
browser: true,
es6: true,
},
extends: ["plugin:@typescript-eslint/recommended", "prettier", "prettier/@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
sourceType: "module",
},
plugins: ["@typescript-eslint"],
rules: {
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
},
};
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"files.exclude": {
"**/*.js": { "when": "$(basename).ts" },
"**/*.d.ts": { "when": "$(basename).ts" }
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.d.ts": {
"when": "$(basename).ts"
}
}
}
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"name": "console-fail-test",
"description": "Gently fails test runs if the console was used during them.",
"devDependencies": {
"husky": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^3.0.0",
"@typescript-eslint/parser": "^3.0.0",
"eslint": "^7.1.0",
"eslint-config-prettier": "^6.11.0",
"husky": "^4.2.5",
"npm-run-all": "^4.1.5",
"prettier": "^1.16.4",
"pretty-quick": "^2.0.0",
"tslint": "^5.13.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.3.3333"
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"typescript": "^3.9.3"
},
"main": "src/index.js",
"husky": {
Expand All @@ -25,7 +27,7 @@
},
"scripts": {
"compile": "tsc",
"lint": "tslint -c tslint.json -p tsconfig.json -t stylish",
"lint": "eslint src/**/*.ts",
"prettier:write": "prettier --config .prettierrc.json --write",
"prettier:write:all": "yarn run prettier:write ./{.,src}/**/*.{json,md,ts,yml}",
"verify": "run-s compile lint"
Expand Down
2 changes: 1 addition & 1 deletion src/environments/mocha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const getMochaEnvironment: TestEnvironmentGetter = () => {

return {
after(callback: (afterHooks: TestAfterHooks) => void) {
afterEach(function(this: Mocha) {
afterEach(function (this: Mocha) {
if (this.currentTest.state !== "passed") {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/spies/fallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const getFallbackSpyFactory = (): SpyFactory => (container: any, methodNa
const methodCalls: MethodCall[] = [];
const originalMethod = container[methodName];

const spyMethod = function(this: unknown, ...args: unknown[]) {
const spyMethod = function (this: unknown, ...args: unknown[]) {
methodCalls.push({
args,
stack: createStack(),
Expand Down
2 changes: 1 addition & 1 deletion src/spies/jasmine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const createJasmineSpyFactory = (spyLibrary: Jasmine): SpyFactory => {
const methodCalls: MethodCall[] = [];
const originalMethod = container[methodName];

container[methodName] = spyLibrary.createSpy().and.callFake(function(this: unknown, ...args: unknown[]) {
container[methodName] = spyLibrary.createSpy().and.callFake(function (this: unknown, ...args: unknown[]) {
methodCalls.push({
args,
stack: createStack(),
Expand Down
2 changes: 1 addition & 1 deletion src/spies/jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const createJestSpyFactory = (spyLibrary: Jest): SpyFactory => {
const methodCalls: MethodCall[] = [];
const originalMethod = container[methodName];

const methodSpy = function(this: unknown, ...args: unknown[]) {
const methodSpy = function (this: unknown, ...args: unknown[]) {
methodCalls.push({
args,
stack: createStack(),
Expand Down
2 changes: 1 addition & 1 deletion src/spies/sinon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const createSinonSpyFactory = (spyLibrary: Sinon): SpyFactory => {
const methodCalls: MethodCall[] = [];
const originalMethod = container[methodName];

const spyMethod = spyLibrary.spy(function(this: unknown, ...args: unknown[]) {
const spyMethod = spyLibrary.spy(function (this: unknown, ...args: unknown[]) {
methodCalls.push({
args,
stack: createStack(),
Expand Down
42 changes: 0 additions & 42 deletions tslint.json

This file was deleted.

Loading

0 comments on commit e67a0c1

Please sign in to comment.