Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
w3nl committed Jul 2, 2020
1 parent 8cc5319 commit a9e7dc1
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 34 deletions.
35 changes: 19 additions & 16 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,35 @@ module.exports = {
env: {
es6: true,
node: true,
browser: true
browser: true,
},
extends: ['@hckrnews/eslint-config'],
parserOptions: {
sourceType: "module",
parser: "babel-eslint",
sourceType: 'module',
parser: 'babel-eslint',
babelOptions: {
configFile: "babel.config.js",
}
configFile: 'babel.config.js',
},
},
rules: {
"import/extensions": ['error', {
"js": "never",
"mjs": "always",
"json": "always"
}]
'import/extensions': [
'error',
{
js: 'never',
mjs: 'always',
json: 'always',
},
],
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true
}
}
]
jest: true,
},
},
],
};
4 changes: 2 additions & 2 deletions src/AndTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class AndTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => and(row));
this.result = this.inputs.map(row => [and(row), ...row]);
this.output = this.inputs.map((row) => and(row));
this.result = this.inputs.map((row) => [and(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/NandTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class NandTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => nand(row));
this.result = this.inputs.map(row => [nand(row), ...row]);
this.output = this.inputs.map((row) => nand(row));
this.result = this.inputs.map((row) => [nand(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/NorTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class NorTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => nor(row));
this.result = this.inputs.map(row => [nor(row), ...row]);
this.output = this.inputs.map((row) => nor(row));
this.result = this.inputs.map((row) => [nor(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/NotTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class NotTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => not(row));
this.result = this.inputs.map(row => [not(row), ...row]);
this.output = this.inputs.map((row) => not(row));
this.result = this.inputs.map((row) => [not(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/OrTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class OrTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => or(row));
this.result = this.inputs.map(row => [or(row), ...row]);
this.output = this.inputs.map((row) => or(row));
this.result = this.inputs.map((row) => [or(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/XandTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class XandTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => xand(row));
this.result = this.inputs.map(row => [xand(row), ...row]);
this.output = this.inputs.map((row) => xand(row));
this.result = this.inputs.map((row) => [xand(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/XnandTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class XnandTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => xnand(row));
this.result = this.inputs.map(row => [xnand(row), ...row]);
this.output = this.inputs.map((row) => xnand(row));
this.result = this.inputs.map((row) => [xnand(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/XnorTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class XnorTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => xnor(row));
this.result = this.inputs.map(row => [xnor(row), ...row]);
this.output = this.inputs.map((row) => xnor(row));
this.result = this.inputs.map((row) => [xnor(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/XorTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class XorTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => xor(row));
this.result = this.inputs.map(row => [xor(row), ...row]);
this.output = this.inputs.map((row) => xor(row));
this.result = this.inputs.map((row) => [xor(row), ...row]);
}
}

Expand Down

0 comments on commit a9e7dc1

Please sign in to comment.