Skip to content

Commit

Permalink
chore: add prettier and eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
rboixaderg committed Nov 23, 2023
1 parent 102ba98 commit 0ba0fca
Show file tree
Hide file tree
Showing 20 changed files with 1,072 additions and 161 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
run: npm install
working-directory: electron-app

- name: lint/format
env:
CI: false
run: npm run ci:format
working-directory: electron-app

- name: test
env:
CI: false
Expand Down
5 changes: 5 additions & 0 deletions electron-app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
node_modules
out
forge.config.js
vitest.config.ts
30 changes: 30 additions & 0 deletions electron-app/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
indent: ['error', 2],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
'@typescript-eslint/ban-types': 'off',
},
};
3 changes: 3 additions & 0 deletions electron-app/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
node_modules
out
12 changes: 12 additions & 0 deletions electron-app/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// .prettierrc.js
module.exports = {
printWidth: 120,
singleQuote: true,
useTabs: false,
tabWidth: 2,
bracketSpacing: true,
trailingComma: 'all',
bracketSameLine: true,
singleAttributePerLine: true,
htmlWhitespaceSensitivity: 'ignore',
};
24 changes: 12 additions & 12 deletions electron-app/forge.config.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
module.exports = {
packagerConfig: {
asar: true,
icon: "public/logo.png",
name: "Nuclia sync",
executableName: "nuclia-sync-agent",
icon: 'public/logo.png',
name: 'Nuclia sync',
executableName: 'nuclia-sync-agent',
},
rebuildConfig: {},
makers: [
{
name: "@electron-forge/maker-squirrel",
name: '@electron-forge/maker-squirrel',
},
{
name: "@electron-forge/maker-zip",
platforms: ["darwin"],
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
},
{
name: "@electron-forge/maker-deb",
name: '@electron-forge/maker-deb',
config: {},
},
{
name: "@electron-forge/maker-dmg",
name: '@electron-forge/maker-dmg',
config: {},
},
{
name: "@electron-forge/maker-rpm",
name: '@electron-forge/maker-rpm',
config: {},
},
],
publishers: [
{
name: "@electron-forge/publisher-github",
name: '@electron-forge/publisher-github',
config: {
repository: {
owner: "nuclia",
name: "sync-agent",
owner: 'nuclia',
name: 'sync-agent',
},
draft: true,
},
Expand Down
Loading

0 comments on commit 0ba0fca

Please sign in to comment.