feat: implement eslint
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
*.d.ts
|
||||
|
||||
# Ignore files for PNPM, NPM and YARN
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
|
||||
@@ -1,20 +1 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
|
||||
plugins: ['svelte3', '@typescript-eslint'],
|
||||
ignorePatterns: ['*.cjs'],
|
||||
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
|
||||
settings: {
|
||||
'svelte3/typescript': () => require('typescript')
|
||||
},
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 2019
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
es2017: true,
|
||||
node: true
|
||||
}
|
||||
}
|
||||
module.exports = require('config/eslintrc.config.cjs')
|
||||
|
||||
@@ -35,9 +35,10 @@
|
||||
"@typescript-eslint/parser": "^5.51.0",
|
||||
"base-64": "^1.0.0",
|
||||
"browserslist": "^4.21.5",
|
||||
"config": "workspace:*",
|
||||
"cssnano": "^5.1.14",
|
||||
"eslint": "^8.33.0",
|
||||
"eslint-plugin-svelte3": "^4.0.0",
|
||||
"eslint-plugin-svelte": "^2.16.0",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss-focus-visible": "^8.0.2",
|
||||
"postcss-normalize": "^10.0.1",
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"name": "housesof",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"apps/*"
|
||||
"apps/*",
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "turbo run dev --parallel",
|
||||
@@ -18,5 +19,5 @@
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
},
|
||||
"packageManager": "^pnpm@7.0.0"
|
||||
"packageManager": "^pnpm@7.27.0"
|
||||
}
|
||||
78
packages/config/eslintrc.config.cjs
Normal file
78
packages/config/eslintrc.config.cjs
Normal file
@@ -0,0 +1,78 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
es2017: true,
|
||||
node: true,
|
||||
},
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 2020,
|
||||
project: './*/tsconfig.json',
|
||||
extraFileExtensions: ['.svelte']
|
||||
},
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: [
|
||||
'@typescript-eslint'
|
||||
],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:svelte/recommended',
|
||||
],
|
||||
ignorePatterns: [
|
||||
'*.d.ts',
|
||||
'**/build/**', '**/node_modules/**', '**/.svelte-kit/**', '**/dist/**'
|
||||
],
|
||||
overrides: [
|
||||
{
|
||||
'files': ['*.svelte'],
|
||||
'parser': 'svelte-eslint-parser',
|
||||
'parserOptions': {
|
||||
'parser': '@typescript-eslint/parser'
|
||||
}
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
/* Javascript / Typescript
|
||||
========================================= */
|
||||
// Use spaces over tabs
|
||||
'no-tabs': 'error',
|
||||
indent: ['error', 4],
|
||||
// Use single quote in javascript
|
||||
quotes: ['error', 'single', {
|
||||
avoidEscape: true,
|
||||
allowTemplateLiterals: true
|
||||
}],
|
||||
// Avoid semicolons
|
||||
semi: ['error', 'never'],
|
||||
// Avoid ==
|
||||
eqeqeq: 'error',
|
||||
// Avoid trailing spaces
|
||||
'no-trailing-spaces': ['error', { skipBlankLines: true }],
|
||||
// Add a space between curlies
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
// Require a line at end of file
|
||||
'eol-last': ['error', 'always'],
|
||||
// Allow ts exceptions
|
||||
'@typescript-eslint/ban-ts-comment': ['error', {
|
||||
'ts-ignore': false,
|
||||
'ts-nocheck': false,
|
||||
'ts-expect-error': 'allow-with-description',
|
||||
}],
|
||||
|
||||
/* Svelte
|
||||
========================================= */
|
||||
// Use double quotes
|
||||
'svelte/html-quotes': ['error', {
|
||||
prefer: 'double',
|
||||
dynamic: {
|
||||
quoted: false,
|
||||
avoidInvalidUnquotedInHTML: false,
|
||||
}
|
||||
}],
|
||||
},
|
||||
settings: {
|
||||
},
|
||||
}
|
||||
5
packages/config/package.json
Normal file
5
packages/config/package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "config",
|
||||
"version": "0.0.0",
|
||||
"private": true
|
||||
}
|
||||
79
pnpm-lock.yaml
generated
79
pnpm-lock.yaml
generated
@@ -30,11 +30,12 @@ importers:
|
||||
'@typescript-eslint/parser': ^5.51.0
|
||||
base-64: ^1.0.0
|
||||
browserslist: ^4.21.5
|
||||
config: workspace:*
|
||||
cssnano: ^5.1.14
|
||||
dayjs: ^1.11.7
|
||||
embla-carousel: ^7.0.9
|
||||
eslint: ^8.33.0
|
||||
eslint-plugin-svelte3: ^4.0.0
|
||||
eslint-plugin-svelte: ^2.16.0
|
||||
focus-visible: ^5.2.0
|
||||
motion: ^10.15.5
|
||||
ogl: ^0.0.110
|
||||
@@ -73,9 +74,10 @@ importers:
|
||||
'@typescript-eslint/parser': 5.51.0_4vsywjlpuriuw3tl5oq6zy5a64
|
||||
base-64: 1.0.0
|
||||
browserslist: 4.21.5
|
||||
config: link:../../packages/config
|
||||
cssnano: 5.1.14_postcss@8.4.21
|
||||
eslint: 8.33.0
|
||||
eslint-plugin-svelte3: 4.0.0_4omm2ewoudhgnmf7aocafatnc4
|
||||
eslint-plugin-svelte: 2.18.0_4omm2ewoudhgnmf7aocafatnc4
|
||||
postcss: 8.4.21
|
||||
postcss-focus-visible: 8.0.2_postcss@8.4.21
|
||||
postcss-normalize: 10.0.1_jrpp4geoaqu5dz2gragkckznb4
|
||||
@@ -89,6 +91,12 @@ importers:
|
||||
typescript: 4.9.5
|
||||
vite: 4.1.1_sass@1.58.0
|
||||
|
||||
packages/config:
|
||||
specifiers: {}
|
||||
|
||||
packages/utils:
|
||||
specifiers: {}
|
||||
|
||||
packages:
|
||||
|
||||
/@authenio/samlify-node-xmllint/2.0.0_samlify@2.8.7:
|
||||
@@ -5066,14 +5074,30 @@ packages:
|
||||
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
/eslint-plugin-svelte3/4.0.0_4omm2ewoudhgnmf7aocafatnc4:
|
||||
resolution: {integrity: sha512-OIx9lgaNzD02+MDFNLw0GEUbuovNcglg+wnd/UY0fbZmlQSz7GlQiQ1f+yX0XvC07XPcDOnFcichqI3xCwp71g==}
|
||||
/eslint-plugin-svelte/2.18.0_4omm2ewoudhgnmf7aocafatnc4:
|
||||
resolution: {integrity: sha512-oS7Ww73AKYcCY2uBiTMpu9HXrHPb9kSjrTcGljuSYh29CTPd8C+UTGWDDIRfbUyFelE3EbyksZjuPoVeUpoSBg==}
|
||||
engines: {node: ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: '>=8.0.0'
|
||||
svelte: ^3.2.0
|
||||
eslint: ^7.0.0 || ^8.0.0-0
|
||||
svelte: ^3.37.0
|
||||
peerDependenciesMeta:
|
||||
svelte:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.4.14
|
||||
debug: 4.3.4
|
||||
eslint: 8.33.0
|
||||
eslint-utils: 3.0.0_eslint@8.33.0
|
||||
esutils: 2.0.3
|
||||
known-css-properties: 0.26.0
|
||||
postcss: 8.4.21
|
||||
postcss-load-config: 3.1.4_postcss@8.4.21
|
||||
postcss-safe-parser: 6.0.0_postcss@8.4.21
|
||||
svelte: 3.55.1
|
||||
svelte-eslint-parser: 0.23.0_svelte@3.55.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
- ts-node
|
||||
dev: true
|
||||
|
||||
/eslint-scope/5.1.1:
|
||||
@@ -6605,6 +6629,10 @@ packages:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/known-css-properties/0.26.0:
|
||||
resolution: {integrity: sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg==}
|
||||
dev: true
|
||||
|
||||
/ldap-filter/0.3.3:
|
||||
resolution: {integrity: sha512-/tFkx5WIn4HuO+6w9lsfxq4FN3O+fDZeO9Mek8dCD8rTUpqzRa766BOBO7BcGkn3X86m5+cBm1/2S/Shzz7gMg==}
|
||||
engines: {node: '>=0.8'}
|
||||
@@ -7578,6 +7606,7 @@ packages:
|
||||
/pg/8.8.0:
|
||||
resolution: {integrity: sha512-UXYN0ziKj+AeNNP7VDMwrehpACThH7LUl/p8TDFpEUuSejCUIwGSfxpHsPvtM6/WXFy6SU4E5RG4IJV/TZAGjw==}
|
||||
engines: {node: '>= 8.0.0'}
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
pg-native: '>=3.0.1'
|
||||
peerDependenciesMeta:
|
||||
@@ -7979,6 +8008,23 @@ packages:
|
||||
postcss-value-parser: 4.2.0
|
||||
dev: true
|
||||
|
||||
/postcss-load-config/3.1.4_postcss@8.4.21:
|
||||
resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==}
|
||||
engines: {node: '>= 10'}
|
||||
peerDependencies:
|
||||
postcss: '>=8.0.9'
|
||||
ts-node: '>=9.0.0'
|
||||
peerDependenciesMeta:
|
||||
postcss:
|
||||
optional: true
|
||||
ts-node:
|
||||
optional: true
|
||||
dependencies:
|
||||
lilconfig: 2.0.6
|
||||
postcss: 8.4.21
|
||||
yaml: 1.10.2
|
||||
dev: true
|
||||
|
||||
/postcss-logical/6.0.1_postcss@8.4.21:
|
||||
resolution: {integrity: sha512-0LIzRgbT42n0q8txcM9SrLkYLjr1LTbRTy80bnKiYXY8tnYGdjkBymwb5XE87o4csW1z8dhKD1VRI6cHBQBQtw==}
|
||||
engines: {node: ^14 || ^16 || >=18}
|
||||
@@ -8354,6 +8400,15 @@ packages:
|
||||
postcss: 8.4.21
|
||||
dev: true
|
||||
|
||||
/postcss-safe-parser/6.0.0_postcss@8.4.21:
|
||||
resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==}
|
||||
engines: {node: '>=12.0'}
|
||||
peerDependencies:
|
||||
postcss: ^8.3.3
|
||||
dependencies:
|
||||
postcss: 8.4.21
|
||||
dev: true
|
||||
|
||||
/postcss-selector-not/7.0.1_postcss@8.4.21:
|
||||
resolution: {integrity: sha512-1zT5C27b/zeJhchN7fP0kBr16Cc61mu7Si9uWWLoA3Px/D9tIJPKchJCkUH3tPO5D0pCFmGeApAv8XpXBQJ8SQ==}
|
||||
engines: {node: ^14 || ^16 || >=18}
|
||||
@@ -9508,6 +9563,18 @@ packages:
|
||||
- sugarss
|
||||
dev: true
|
||||
|
||||
/svelte-eslint-parser/0.23.0_svelte@3.55.1:
|
||||
resolution: {integrity: sha512-1BJBYGDzlhxmBvbx0ZXdwfPkEP+9sOn63ei6HgkWNNx/J1LH04Ykw+ZHx9Bf5Rh3zzZqjVvy23vmx+WIjCu7CA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
svelte: ^3.37.0
|
||||
dependencies:
|
||||
eslint-scope: 7.1.1
|
||||
eslint-visitor-keys: 3.3.0
|
||||
espree: 9.4.1
|
||||
svelte: 3.55.1
|
||||
dev: true
|
||||
|
||||
/svelte-hmr/0.15.1_svelte@3.55.1:
|
||||
resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==}
|
||||
engines: {node: ^12.20 || ^14.13.1 || >= 16}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
packages:
|
||||
- "apps/*"
|
||||
- "apps/*"
|
||||
- "packages/*"
|
||||
|
||||
Reference in New Issue
Block a user