add prettier to templates

pull/3176/head
filip mertens 2 years ago
parent f385dbb1dd
commit 62e9dac75e
  1. 44
      libs/remix-ws-templates/src/templates/blank/.prettierrc
  2. 7
      libs/remix-ws-templates/src/templates/blank/index.ts
  3. 44
      libs/remix-ws-templates/src/templates/gnosisSafeMultisig/.prettierrc
  4. 4
      libs/remix-ws-templates/src/templates/gnosisSafeMultisig/index.ts
  5. 44
      libs/remix-ws-templates/src/templates/ozerc1155/.prettierrc
  6. 6
      libs/remix-ws-templates/src/templates/ozerc1155/index.ts
  7. 44
      libs/remix-ws-templates/src/templates/ozerc20/.prettierrc
  8. 6
      libs/remix-ws-templates/src/templates/ozerc20/index.ts
  9. 44
      libs/remix-ws-templates/src/templates/ozerc721/.prettierrc
  10. 4
      libs/remix-ws-templates/src/templates/ozerc721/index.ts
  11. 44
      libs/remix-ws-templates/src/templates/remixDefault/.prettierrc
  12. 2
      libs/remix-ws-templates/src/templates/remixDefault/index.ts
  13. 44
      libs/remix-ws-templates/src/templates/zeroxErc20/.prettierrc
  14. 6
      libs/remix-ws-templates/src/templates/zeroxErc20/index.ts
  15. 5
      workspace.json

@ -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": {
}
}
]
}

@ -1 +1,6 @@
export default async () => { return {}}
export default async () => {
return {
// @ts-ignore
'.prettierrc.json': (await import('raw-loader!./.prettierrc')).default
}
}

@ -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": {
}
}
]
}

@ -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
}
}

@ -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": {
}
}
]
}

@ -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

@ -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": {
}
}
]
}

@ -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

@ -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": {
}
}
]
}

@ -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

@ -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": {
}
}
]
}

@ -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,
}
}

@ -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": {
}
}
]
}

@ -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
}
}

@ -1450,6 +1450,11 @@
"glob": "*.md",
"input": "libs/remix-ws-templates/",
"output": "/"
},
{
"glob": "templates/**/.prettierrc",
"input": "libs/remix-ws-templates/src/",
"output": "src/"
}
]
}

Loading…
Cancel
Save