This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add formatter * Test with formatter * Format with `npm run format` * Fix formatting errors * Use rel="noopener noreferrer" with target="_blank" * Turn off no-case-declarations for now (when turned on, this disables switch statements)
- Loading branch information
1 parent
6364d1e
commit c2c75a9
Showing
98 changed files
with
8,554 additions
and
6,620 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const { spawn } = require('child_process') | ||
|
||
const testFormat = () => { | ||
return new Promise((resolve, reject) => { | ||
const eslint = spawn('./node_modules/.bin/eslint', [ | ||
'scripts/**/*.js', | ||
'src/**/*.js' | ||
]) | ||
eslint.stdout.on('data', data => { | ||
reject(`Code formatter inspection failed:\n${String(data)}`) | ||
}) | ||
eslint.on('exit', code => { | ||
if (code === 0) { | ||
console.log('Code formatter inspection passed.') | ||
} | ||
resolve() | ||
}) | ||
}) | ||
} | ||
|
||
module.exports = testFormat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const testJavascript = () => { | ||
console.log("We don't have tests yet.") | ||
console.log('Please see Testing Strategy issue #149 and provide your input.') | ||
|
||
return true | ||
} | ||
|
||
module.exports = testJavascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
console.log("We don't have tests yet.") | ||
console.log("Please see Testing Strategy issue #149 and provide your input.") | ||
const chalk = require('chalk') | ||
const testJavascript = require('./helpers/test-javascript') | ||
const testFormat = require('./helpers/test-format') | ||
|
||
const start = async () => { | ||
try { | ||
console.log(chalk`\n{bold.hex('#6e3bea') ⬢ Testing Formatting }\n`) | ||
await testFormat() | ||
console.log(chalk`\n{bold.hex('#1a82ff') ⬢ Testing Javascript }\n`) | ||
await testJavascript() | ||
console.log(chalk`\n{bold ✅ Tests passed. :) }\n`) | ||
process.exit() | ||
} catch (error) { | ||
console.log(chalk`\n{bold ⚠️ Tests failed. :( }\n`) | ||
console.error(error) | ||
process.exit(1) | ||
} | ||
} | ||
|
||
start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.