diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..5f7b681 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,16 @@ +**/lwc/**/*.css +**/lwc/**/*.html +**/lwc/**/*.json +**/lwc/**/*.svg +**/lwc/**/*.xml +**/aura/**/*.auradoc +**/aura/**/*.cmp +**/aura/**/*.css +**/aura/**/*.design +**/aura/**/*.evt +**/aura/**/*.json +**/aura/**/*.svg +**/aura/**/*.tokens +**/aura/**/*.xml +**/aura/**/*.app +.sfdx diff --git a/.forceignore b/.forceignore new file mode 100755 index 0000000..7b5b5a7 --- /dev/null +++ b/.forceignore @@ -0,0 +1,12 @@ +# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status +# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm +# + +package.xml + +# LWC configuration files +**/jsconfig.json +**/.eslintrc.json + +# LWC Jest +**/__tests__/** \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd20187 --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +# This file is used for Git repositories to specify intentionally untracked files that Git should ignore. +# If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore +# For useful gitignore templates see: https://github.com/github/gitignore + +# Salesforce cache +.sfdx/ +.localdevserver/ + +# LWC VSCode autocomplete +**/lwc/jsconfig.json + +# LWC Jest coverage reports +coverage/ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Dependency directories +node_modules/ + +# Eslint cache +.eslintcache + +# MacOS system files +.DS_Store + +# Windows system files +Thumbs.db +ehthumbs.db +[Dd]esktop.ini +$RECYCLE.BIN/ + +# Local environment variables +.env + +# Ignore Intellij config files +.idea/ +*.iml +*.iws +IlluminatedCloud/ +.project.license \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100755 index 0000000..f3720b2 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,10 @@ +# List files or directories below to ignore them when running prettier +# More information: https://prettier.io/docs/en/ignore.html +# + +**/staticresources/** +.localdevserver +.sfdx +.vscode + +coverage/ \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100755 index 0000000..15683b6 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,13 @@ +{ + "trailingComma": "none", + "overrides": [ + { + "files": "**/lwc/**/*.html", + "options": { "parser": "lwc" } + }, + { + "files": "*.{cmp,page,component}", + "options": { "parser": "html" } + } + ] +} diff --git a/config/project-scratch-def.json b/config/project-scratch-def.json new file mode 100644 index 0000000..74711dc --- /dev/null +++ b/config/project-scratch-def.json @@ -0,0 +1,13 @@ +{ + "orgName": "fflib-apex-extensions", + "edition": "Developer", + "features": ["EnableSetPasswordInApi"], + "settings": { + "lightningExperienceSettings": { + "enableS1DesktopEnabled": true + }, + "mobileSettings": { + "enableS1EncryptedStoragePref2": false + } + } +} diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..f5a9fed --- /dev/null +++ b/jest.config.js @@ -0,0 +1,6 @@ +const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config'); + +module.exports = { + ...jestConfig, + modulePathIgnorePatterns: ['/.localdevserver'] +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..060c432 --- /dev/null +++ b/package.json @@ -0,0 +1,43 @@ +{ + "name": "salesforce-app", + "private": true, + "version": "1.0.0", + "description": "Salesforce App", + "scripts": { + "lint": "npm run lint:lwc && npm run lint:aura", + "lint:aura": "eslint **/aura/**", + "lint:lwc": "eslint **/lwc/**", + "test": "npm run test:unit", + "test:unit": "sfdx-lwc-jest", + "test:unit:watch": "sfdx-lwc-jest --watch", + "test:unit:debug": "sfdx-lwc-jest --debug", + "test:unit:coverage": "sfdx-lwc-jest --coverage", + "prettier": "prettier --write \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"", + "prettier:verify": "prettier --list-different \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"" + }, + "devDependencies": { + "@prettier/plugin-xml": "^0.12.0", + "@salesforce/eslint-config-lwc": "^0.11.0", + "@salesforce/eslint-plugin-aura": "^2.0.0", + "@salesforce/sfdx-lwc-jest": "^0.10.4", + "eslint": "^7.24.0", + "eslint-config-prettier": "^6.11.0", + "husky": "^4.2.1", + "lint-staged": "^10.0.7", + "prettier": "^2.0.5", + "prettier-plugin-apex": "^1.6.0" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}": [ + "prettier --write" + ], + "**/{aura|lwc}/**": [ + "eslint" + ] + } +} diff --git a/sfdx-project.json b/sfdx-project.json new file mode 100644 index 0000000..f635075 --- /dev/null +++ b/sfdx-project.json @@ -0,0 +1,12 @@ +{ + "packageDirectories": [ + { + "path": "sfdx-source/force-app", + "default": true + } + ], + "name": "fflib-apex-extensions", + "namespace": "", + "sfdcLoginUrl": "https://login.salesforce.com", + "sourceApiVersion": "51.0" +}