diff --git a/prettier.config.js b/.prettierrc.js similarity index 100% rename from prettier.config.js rename to .prettierrc.js diff --git a/package.json b/package.json index 3b6c3c94..fdeed196 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "CHANGELOG.md", "build/src", "build/template", - "prettier.config.js", + ".prettierrc.js", "tsconfig-google.json", "tsconfig.json", ".eslintrc.json" diff --git a/src/init.ts b/src/init.ts index 657c9989..9e41186d 100644 --- a/src/init.ts +++ b/src/init.ts @@ -179,7 +179,7 @@ async function writePackageJson( } export const ESLINT_CONFIG = { - extends: './node_modules/gts/build/src/index.js', + extends: './node_modules/gts/', }; async function generateConfigFile( @@ -239,10 +239,10 @@ async function generateTsConfig(options: Options): Promise { async function generatePrettierConfig(options: Options): Promise { const style = await read( - path.join(__dirname, '../../prettier.config.js'), + path.join(__dirname, '../../.prettierrc.js'), 'utf8' ); - return generateConfigFile(options, './prettier.config.js', style); + return generateConfigFile(options, './.prettierrc.js', style); } export async function installDefaultTemplate( diff --git a/test/fixtures/kitchen/src/samples.js b/test/fixtures/kitchen/src/samples.js new file mode 100644 index 00000000..0361cfc7 --- /dev/null +++ b/test/fixtures/kitchen/src/samples.js @@ -0,0 +1,2 @@ +let isASample = true; +console.log(isASample); diff --git a/test/kitchen.ts b/test/kitchen.ts index 10474e82..e0f3c34b 100644 --- a/test/kitchen.ts +++ b/test/kitchen.ts @@ -60,7 +60,7 @@ describe('🚰 kitchen sink', () => { // Ensure config files got generated. fs.accessSync(path.join(kitchenPath, 'tsconfig.json')); fs.accessSync(path.join(kitchenPath, '.eslintrc.json')); - fs.accessSync(path.join(kitchenPath, 'prettier.config.js')); + fs.accessSync(path.join(kitchenPath, '.prettierrc.js')); // Compilation shouldn't have happened. Hence no `build` directory. const dirContents = fs.readdirSync(kitchenPath);