diff --git a/libs/remix-ws-templates/src/templates/blank/.prettierrc b/libs/remix-ws-templates/src/templates/blank/.prettierrc new file mode 100644 index 0000000000..ea6cfd4a9c --- /dev/null +++ b/libs/remix-ws-templates/src/templates/blank/.prettierrc @@ -0,0 +1,44 @@ +{ + "overrides": [ + { + "files": "*.sol", + "options": { + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + }, + { + "files": "*.yml", + "options": { + } + }, + { + "files": "*.yaml", + "options": { + } + }, + { + "files": "*.toml", + "options": { + } + }, + { + "files": "*.json", + "options": { + } + }, + { + "files": "*.js", + "options": { + } + }, + { + "files": "*.ts", + "options": { + } + } + ] +} \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/blank/index.ts b/libs/remix-ws-templates/src/templates/blank/index.ts index 6840e8d560..c1733fd71d 100644 --- a/libs/remix-ws-templates/src/templates/blank/index.ts +++ b/libs/remix-ws-templates/src/templates/blank/index.ts @@ -1 +1,6 @@ -export default async () => { return {}} \ No newline at end of file +export default async () => { + return { + // @ts-ignore + '.prettierrc.json': (await import('raw-loader!./.prettierrc')).default + } +} \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/.prettierrc b/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/.prettierrc new file mode 100644 index 0000000000..ea6cfd4a9c --- /dev/null +++ b/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/.prettierrc @@ -0,0 +1,44 @@ +{ + "overrides": [ + { + "files": "*.sol", + "options": { + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + }, + { + "files": "*.yml", + "options": { + } + }, + { + "files": "*.yaml", + "options": { + } + }, + { + "files": "*.toml", + "options": { + } + }, + { + "files": "*.json", + "options": { + } + }, + { + "files": "*.js", + "options": { + } + }, + { + "files": "*.ts", + "options": { + } + } + ] +} \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/index.ts b/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/index.ts index 81bad2df43..f7a677cf61 100644 --- a/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/index.ts +++ b/libs/remix-ws-templates/src/templates/gnosisSafeMultisig/index.ts @@ -9,6 +9,8 @@ export default async () => { // @ts-ignore 'scripts/ethers-lib.ts': (await import('!!raw-loader!./scripts/ethers-lib.ts')).default, // @ts-ignore - 'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default + 'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default, + // @ts-ignore + '.prettierrc.json': (await import('raw-loader!./.prettierrc')).default } } \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/ozerc1155/.prettierrc b/libs/remix-ws-templates/src/templates/ozerc1155/.prettierrc new file mode 100644 index 0000000000..ea6cfd4a9c --- /dev/null +++ b/libs/remix-ws-templates/src/templates/ozerc1155/.prettierrc @@ -0,0 +1,44 @@ +{ + "overrides": [ + { + "files": "*.sol", + "options": { + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + }, + { + "files": "*.yml", + "options": { + } + }, + { + "files": "*.yaml", + "options": { + } + }, + { + "files": "*.toml", + "options": { + } + }, + { + "files": "*.json", + "options": { + } + }, + { + "files": "*.js", + "options": { + } + }, + { + "files": "*.ts", + "options": { + } + } + ] +} \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/ozerc1155/index.ts b/libs/remix-ws-templates/src/templates/ozerc1155/index.ts index ce7313f0b1..83368641f0 100644 --- a/libs/remix-ws-templates/src/templates/ozerc1155/index.ts +++ b/libs/remix-ws-templates/src/templates/ozerc1155/index.ts @@ -8,7 +8,7 @@ export default async (opts) => { } const filesObj = { - 'contracts/MyToken.sol': erc1155.print({ ...erc1155.defaults, upgradeable: opts && opts.upgradeable ? opts.upgradeable : false}), + 'contracts/MyToken.sol': erc1155.print({ ...erc1155.defaults, upgradeable: opts && opts.upgradeable ? opts.upgradeable : false }), // @ts-ignore 'scripts/deploy_with_ethers.ts': (await import('!!raw-loader!./scripts/deploy_with_ethers.ts')).default, // @ts-ignore @@ -16,7 +16,9 @@ export default async (opts) => { // @ts-ignore 'scripts/ethers-lib.ts': (await import('!!raw-loader!./scripts/ethers-lib.ts')).default, // @ts-ignore - 'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default + 'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default, + // @ts-ignore + '.prettierrc.json': (await import('raw-loader!./.prettierrc')).default } // If no options is selected, opts.upgradeable will be undefined // We do not show test file for upgradeable contract diff --git a/libs/remix-ws-templates/src/templates/ozerc20/.prettierrc b/libs/remix-ws-templates/src/templates/ozerc20/.prettierrc new file mode 100644 index 0000000000..ea6cfd4a9c --- /dev/null +++ b/libs/remix-ws-templates/src/templates/ozerc20/.prettierrc @@ -0,0 +1,44 @@ +{ + "overrides": [ + { + "files": "*.sol", + "options": { + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + }, + { + "files": "*.yml", + "options": { + } + }, + { + "files": "*.yaml", + "options": { + } + }, + { + "files": "*.toml", + "options": { + } + }, + { + "files": "*.json", + "options": { + } + }, + { + "files": "*.js", + "options": { + } + }, + { + "files": "*.ts", + "options": { + } + } + ] +} \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/ozerc20/index.ts b/libs/remix-ws-templates/src/templates/ozerc20/index.ts index 6879620298..3df48f3e02 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/index.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/index.ts @@ -6,7 +6,7 @@ export default async (opts) => { erc20.defaults.burnable = opts.burnable erc20.defaults.pausable = opts.pausable } - + const filesObj = { 'contracts/MyToken.sol': erc20.print({ ...erc20.defaults, upgradeable: opts && opts.upgradeable ? opts.upgradeable : false }), // @ts-ignore @@ -16,7 +16,9 @@ export default async (opts) => { // @ts-ignore 'scripts/ethers-lib.ts': (await import('!!raw-loader!./scripts/ethers-lib.ts')).default, // @ts-ignore - 'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default + 'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default, + // @ts-ignore + '.prettierrc.json': (await import('raw-loader!./.prettierrc')).default } // If no options is selected, opts.upgradeable will be undefined diff --git a/libs/remix-ws-templates/src/templates/ozerc721/.prettierrc b/libs/remix-ws-templates/src/templates/ozerc721/.prettierrc new file mode 100644 index 0000000000..ea6cfd4a9c --- /dev/null +++ b/libs/remix-ws-templates/src/templates/ozerc721/.prettierrc @@ -0,0 +1,44 @@ +{ + "overrides": [ + { + "files": "*.sol", + "options": { + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + }, + { + "files": "*.yml", + "options": { + } + }, + { + "files": "*.yaml", + "options": { + } + }, + { + "files": "*.toml", + "options": { + } + }, + { + "files": "*.json", + "options": { + } + }, + { + "files": "*.js", + "options": { + } + }, + { + "files": "*.ts", + "options": { + } + } + ] +} \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/ozerc721/index.ts b/libs/remix-ws-templates/src/templates/ozerc721/index.ts index d7595e509b..d0f3f6fee0 100644 --- a/libs/remix-ws-templates/src/templates/ozerc721/index.ts +++ b/libs/remix-ws-templates/src/templates/ozerc721/index.ts @@ -16,7 +16,9 @@ export default async (opts) => { // @ts-ignore 'scripts/ethers-lib.ts': (await import('!!raw-loader!./scripts/ethers-lib.ts')).default, // @ts-ignore - 'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default + 'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default, + // @ts-ignore + '.prettierrc.json': (await import('raw-loader!./.prettierrc')).default } // If no options is selected, opts.upgradeable will be undefined diff --git a/libs/remix-ws-templates/src/templates/remixDefault/.prettierrc b/libs/remix-ws-templates/src/templates/remixDefault/.prettierrc new file mode 100644 index 0000000000..ea6cfd4a9c --- /dev/null +++ b/libs/remix-ws-templates/src/templates/remixDefault/.prettierrc @@ -0,0 +1,44 @@ +{ + "overrides": [ + { + "files": "*.sol", + "options": { + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + }, + { + "files": "*.yml", + "options": { + } + }, + { + "files": "*.yaml", + "options": { + } + }, + { + "files": "*.toml", + "options": { + } + }, + { + "files": "*.json", + "options": { + } + }, + { + "files": "*.js", + "options": { + } + }, + { + "files": "*.ts", + "options": { + } + } + ] +} \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/remixDefault/index.ts b/libs/remix-ws-templates/src/templates/remixDefault/index.ts index 69bccc237d..951ff8e5a1 100644 --- a/libs/remix-ws-templates/src/templates/remixDefault/index.ts +++ b/libs/remix-ws-templates/src/templates/remixDefault/index.ts @@ -20,5 +20,7 @@ export default async () => { 'tests/storage.test.js': (await import('!!raw-loader!./tests/storage.test.js')).default, // @ts-ignore 'README.txt': (await import('raw-loader!./README.txt')).default, + // @ts-ignore + '.prettierrc.json': (await import('raw-loader!./.prettierrc')).default, } } \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/zeroxErc20/.prettierrc b/libs/remix-ws-templates/src/templates/zeroxErc20/.prettierrc new file mode 100644 index 0000000000..ea6cfd4a9c --- /dev/null +++ b/libs/remix-ws-templates/src/templates/zeroxErc20/.prettierrc @@ -0,0 +1,44 @@ +{ + "overrides": [ + { + "files": "*.sol", + "options": { + "printWidth": 80, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + }, + { + "files": "*.yml", + "options": { + } + }, + { + "files": "*.yaml", + "options": { + } + }, + { + "files": "*.toml", + "options": { + } + }, + { + "files": "*.json", + "options": { + } + }, + { + "files": "*.js", + "options": { + } + }, + { + "files": "*.ts", + "options": { + } + } + ] +} \ No newline at end of file diff --git a/libs/remix-ws-templates/src/templates/zeroxErc20/index.ts b/libs/remix-ws-templates/src/templates/zeroxErc20/index.ts index 48ffb45341..ca5eeb6dbe 100644 --- a/libs/remix-ws-templates/src/templates/zeroxErc20/index.ts +++ b/libs/remix-ws-templates/src/templates/zeroxErc20/index.ts @@ -11,6 +11,10 @@ export default async () => { // @ts-ignore 'scripts/web3-lib.ts': (await import('!!raw-loader!./scripts/web3-lib.ts')).default, // @ts-ignore - 'tests/SampleERC20_test.sol': (await import('raw-loader!./tests/SampleERC20_test.sol')).default + 'tests/SampleERC20_test.sol': (await import('raw-loader!./tests/SampleERC20_test.sol')).default, + // @ts-ignore + '.prettierrc.json': (await import('raw-loader!./.prettierrc')).default, + // @ts-ignore + '.prettierrc2.json': (await import('raw-loader!./.prettierrc')).default } } \ No newline at end of file diff --git a/workspace.json b/workspace.json index 26870676ac..9ead7db343 100644 --- a/workspace.json +++ b/workspace.json @@ -1450,6 +1450,11 @@ "glob": "*.md", "input": "libs/remix-ws-templates/", "output": "/" + }, + { + "glob": "templates/**/.prettierrc", + "input": "libs/remix-ws-templates/src/", + "output": "src/" } ] }