forked from tykayn/funky-framadate-front
- upgrade all packages
- intall & configure linters (eslint, prettier, etc.)
This commit is contained in:
parent
e56d5cdcef
commit
dd9bb8922f
@ -3,8 +3,8 @@ root = true
|
|||||||
|
|
||||||
[*]
|
[*]
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
indent_style = tabs
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 2
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
29
.eslintrc.js
29
.eslintrc.js
@ -1,14 +1,19 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
|
parser: '@typescript-eslint/parser',
|
||||||
extends: [
|
parserOptions: {
|
||||||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
|
ecmaVersion: 2018,
|
||||||
|
sourceType: 'module',
|
||||||
|
project: './tsconfig.json',
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: ['@typescript-eslint'],
|
||||||
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:@typescript-eslint/eslint-recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||||
|
'prettier/@typescript-eslint',
|
||||||
|
'plugin:prettier/recommended',
|
||||||
],
|
],
|
||||||
parserOptions: {
|
rules: {},
|
||||||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
|
|
||||||
sourceType: 'module', // Allows for the use of imports
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
|
|
||||||
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
9
.prettierignore
Normal file
9
.prettierignore
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package-lock.json
|
||||||
|
yarn-lock.json
|
||||||
|
yarn.lock
|
||||||
|
node_modules
|
||||||
|
build
|
||||||
|
dist
|
||||||
|
res
|
||||||
|
coverage
|
||||||
|
.vscode/*
|
@ -1,12 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
parser : '@typescript-eslint/parser', // Specifies the ESLint parser
|
|
||||||
extends : [
|
|
||||||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
|
|
||||||
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
|
|
||||||
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
|
|
||||||
],
|
|
||||||
parserOptions: {
|
|
||||||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
|
|
||||||
sourceType : 'module', // Allows for the use of imports
|
|
||||||
},
|
|
||||||
};
|
|
3
.prettierrc.yaml
Normal file
3
.prettierrc.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
printWidth: 120
|
||||||
|
singleQuote: true
|
||||||
|
tabWidth: 4
|
21402
package-lock.json
generated
21402
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
111
package.json
111
package.json
@ -7,82 +7,99 @@
|
|||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"compodoc": "compodoc -p tsconfig.json",
|
"compodoc": "compodoc -p tsconfig.json",
|
||||||
"serve": "ng serve",
|
"serve": "ng serve",
|
||||||
"build": "ng build --crossOrigin=anonymous --output-hashing=none --prod && npm run package",
|
"build": "ng build --crossOrigin=anonymous --prod",
|
||||||
"package": "cat dist/framadate/*.js > dist/framadate/framadate-scripts-bundled.js && ls -l dist/framadate",
|
"package": "cat dist/framadate/*.js > dist/framadate/framadate-scripts-bundled.js && ls -l dist/framadate",
|
||||||
"build:demo": "ng build --crossOrigin=anonymous --extractCss=true --progress=true --output-hashing=none --prod && npm run package",
|
"bld:pkg": "npm run build && npm run package",
|
||||||
"build:demobliss": "ng build --crossOrigin=anonymous --extractCss=true --baseHref=https://framadate-api.cipherbliss.com --progress=true --output-hashing=none --prod && npm run package",
|
"build:demo": "ng build --crossOrigin=anonymous --extractCss=true --progress=true --prod && npm run package",
|
||||||
|
"build:demobliss": "ng build --crossOrigin=anonymous --extractCss=true --baseHref=https://framadate-api.cipherbliss.com --progress=true --prod && npm run package",
|
||||||
"test": "ng test --code-coverage --watch=false",
|
"test": "ng test --code-coverage --watch=false",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e",
|
"e2e": "ng e2e",
|
||||||
|
"format:check": "prettier --list-different \"src/{app,environments,assets}/**/*{.ts,.js,.json,.css,.scss}\"",
|
||||||
|
"format:all": "prettier --write \"src/**/*.{js,jsx,ts,tsx,md,html,css,scss}\"",
|
||||||
"trans": "ng xi18n --output-path=src/locale --i18n-locale=fr",
|
"trans": "ng xi18n --output-path=src/locale --i18n-locale=fr",
|
||||||
"storybook": "start-storybook -p 6006",
|
"storybook": "start-storybook -p 6006",
|
||||||
"build-storybook": "build-storybook"
|
"build-storybook": "build-storybook",
|
||||||
|
"postinstall": "ngcc"
|
||||||
},
|
},
|
||||||
"private": false,
|
"private": false,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^9.0.0",
|
"@angular/animations": "^9.1.1",
|
||||||
"@angular/cdk": "^9.0.0",
|
"@angular/cdk": "^9.2.0",
|
||||||
"@angular/common": "~9.0.0",
|
"@angular/common": "^9.0.7",
|
||||||
"@angular/compiler": "~9.0.0",
|
"@angular/compiler": "^9.0.7",
|
||||||
"@angular/core": "~9.0.0",
|
"@angular/core": "^9.0.7",
|
||||||
"@angular/forms": "~9.0.0",
|
"@angular/forms": "^9.0.7",
|
||||||
"@angular/localize": "^9.0.0",
|
"@angular/localize": "^9.1.1",
|
||||||
"@angular/platform-browser": "~9.0.0",
|
"@angular/platform-browser": "^9.0.7",
|
||||||
"@angular/platform-browser-dynamic": "~9.0.0",
|
"@angular/platform-browser-dynamic": "^9.0.7",
|
||||||
"@angular/router": "~9.0.0",
|
"@angular/router": "^9.0.7",
|
||||||
"@fullcalendar/core": "^4.3.1",
|
"@fullcalendar/core": "^4.4.0",
|
||||||
"@ngx-translate/core": "^12.1.2",
|
"@ngx-translate/core": "^12.1.2",
|
||||||
"@ngx-translate/http-loader": "^4.0.0",
|
"@ngx-translate/http-loader": "^4.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^2.27.0",
|
"angular-date-value-accessor": "^1.0.2",
|
||||||
"@typescript-eslint/parser": "^2.27.0",
|
|
||||||
"angular-date-value-accessor": "^0.0.2",
|
|
||||||
"bulma": "^0.8.2",
|
"bulma": "^0.8.2",
|
||||||
"chart.js": "^2.8.0",
|
"chart.js": "^2.8.0",
|
||||||
"eslint": "^6.8.0",
|
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"husky": "^4.2.5",
|
|
||||||
"karma-coverage": "^2.0.1",
|
"karma-coverage": "^2.0.1",
|
||||||
"karma-firefox-launcher": "^1.3.0",
|
"karma-firefox-launcher": "^1.3.0",
|
||||||
"karma-phantomjs-launcher": "^1.0.4",
|
"karma-phantomjs-launcher": "^1.0.4",
|
||||||
"lint-staged": "^10.1.3",
|
"ngx-clipboard": "^13.0.0",
|
||||||
"ngx-clipboard": "^12.3.0",
|
"ngx-markdown": "^9.0.0",
|
||||||
"ngx-markdown": "^8.2.2",
|
|
||||||
"ngx-toaster": "^1.0.1",
|
"ngx-toaster": "^1.0.1",
|
||||||
"primeicons": "^2.0.0",
|
"primeicons": "^2.0.0",
|
||||||
"primeng": "^9.0.0-rc.2",
|
"primeng": "^9.0.5",
|
||||||
"quill": "^1.3.7",
|
"quill": "^1.3.7",
|
||||||
"rxjs": "~6.5.4",
|
"rxjs": "^6.5.5",
|
||||||
"rxjs-compat": "^6.5.3",
|
"rxjs-compat": "^6.5.5",
|
||||||
"tslib": "^1.10.0",
|
"tslib": "^1.11.1",
|
||||||
"zone.js": "~0.10.2"
|
"zone.js": "^0.10.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "~0.900.1",
|
"@angular-devkit/build-angular": "^0.901.1",
|
||||||
"@angular/cli": "~9.0.1",
|
"@angular/cli": "^9.0.7",
|
||||||
"@angular/compiler-cli": "^9.0.0",
|
"@angular/compiler-cli": "^9.1.1",
|
||||||
"@angular/language-service": "~9.0.0",
|
"@angular/language-service": "^9.0.7",
|
||||||
"@babel/core": "^7.8.4",
|
"@babel/core": "^7.9.0",
|
||||||
"@storybook/addon-actions": "^5.3.13",
|
"@storybook/addon-actions": "^5.3.18",
|
||||||
"@storybook/addon-links": "^5.3.13",
|
"@storybook/addon-links": "^5.3.18",
|
||||||
"@storybook/addon-notes": "^5.3.13",
|
"@storybook/addon-notes": "^5.3.18",
|
||||||
"@storybook/addons": "^5.3.13",
|
"@storybook/addons": "^5.3.18",
|
||||||
"@storybook/angular": "^5.3.13",
|
"@storybook/angular": "^5.3.18",
|
||||||
"@types/jasmine": "~3.5.3",
|
"@types/jasmine": "^3.5.10",
|
||||||
"@types/jasminewd2": "~2.0.8",
|
"@types/jasminewd2": "~2.0.8",
|
||||||
"@types/node": "^12.11.1",
|
"@types/node": "^13.11.1",
|
||||||
"babel-loader": "^8.0.6",
|
"@typescript-eslint/eslint-plugin": "^2.27.0",
|
||||||
"codelyzer": "^5.1.2",
|
"@typescript-eslint/parser": "^2.27.0",
|
||||||
|
"babel-loader": "^8.1.0",
|
||||||
"compodoc": "^0.0.41",
|
"compodoc": "^0.0.41",
|
||||||
|
"eslint": "^6.8.0",
|
||||||
|
"eslint-config-prettier": "^6.10.1",
|
||||||
|
"eslint-plugin-prettier": "^3.1.3",
|
||||||
|
"husky": "^4.2.5",
|
||||||
"jasmine-core": "~3.5.0",
|
"jasmine-core": "~3.5.0",
|
||||||
"jasmine-spec-reporter": "~4.2.1",
|
"jasmine-spec-reporter": "~5.0.1",
|
||||||
"karma": "^5.0.1",
|
"karma": "^5.0.1",
|
||||||
"karma-chrome-launcher": "~3.1.0",
|
"karma-chrome-launcher": "~3.1.0",
|
||||||
"karma-coverage-istanbul-reporter": "~2.1.1",
|
"karma-coverage-istanbul-reporter": "~2.1.1",
|
||||||
"karma-jasmine": "~3.1.0",
|
"karma-jasmine": "~3.1.0",
|
||||||
"karma-jasmine-html-reporter": "^1.5.2",
|
"karma-jasmine-html-reporter": "^1.5.3",
|
||||||
|
"lint-staged": "^10.1.3",
|
||||||
|
"prettier": "^2.0.4",
|
||||||
"protractor": "~5.4.3",
|
"protractor": "~5.4.3",
|
||||||
"ts-node": "~8.6.2",
|
"ts-node": "~8.8.2",
|
||||||
"tslint": "^6.1.1",
|
"typescript": "~3.8.3"
|
||||||
"typescript": "~3.7.5"
|
},
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-commit": "lint-staged"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"src/{app,environments,assets}/**/*.{js,jsx,ts,tsx,md,html,css,scss}": [
|
||||||
|
"prettier --write",
|
||||||
|
"git add"
|
||||||
|
],
|
||||||
|
"*.js": "eslint --cache --fix"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
baseHref: "https://framadate-api.cipherbliss.com/",
|
baseHref: 'https://framadate-api.cipherbliss.com/',
|
||||||
baseApiHref: 'https://framadate-api.cipherbliss.com/api/v1'
|
baseApiHref: 'https://framadate-api.cipherbliss.com/api/v1',
|
||||||
};
|
};
|
||||||
|
@ -1,24 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out-tsc/app",
|
"outDir": "./out-tsc/app",
|
||||||
"types": [
|
"types": ["node"],
|
||||||
"node"
|
"typeRoots": ["./node_modules/@types"]
|
||||||
],
|
},
|
||||||
"typeRoots": [
|
"files": ["src/main.ts", "src/polyfills.ts"],
|
||||||
"./node_modules/@types"
|
"include": ["src/**/*.d.ts"],
|
||||||
]
|
"exclude": ["src/test.ts", "src/**/*.spec.ts", "**/*.stories.ts"]
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/main.ts",
|
|
||||||
"src/polyfills.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src/**/*.d.ts"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"src/test.ts",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"**/*.stories.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"node": true,
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"outDir": "./dist/out-tsc",
|
"outDir": "./dist/out-tsc",
|
||||||
@ -8,23 +7,17 @@
|
|||||||
"declaration": false,
|
"declaration": false,
|
||||||
"downlevelIteration": true,
|
"downlevelIteration": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"module": "esnext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"target": "es2018",
|
"target": "es2015",
|
||||||
"types": [
|
"types": ["node"],
|
||||||
"node"
|
"typeRoots": ["node_modules/@types"],
|
||||||
],
|
"lib": ["es2018", "dom"]
|
||||||
"typeRoots": [
|
|
||||||
"node_modules/@types"
|
|
||||||
],
|
|
||||||
"lib": [
|
|
||||||
"es2018",
|
|
||||||
"dom"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"fullTemplateTypeCheck": true,
|
"fullTemplateTypeCheck": true,
|
||||||
"strictInjectionParameters": true
|
"strictInjectionParameters": true,
|
||||||
|
"strictTemplates": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out-tsc/spec",
|
"outDir": "./out-tsc/spec",
|
||||||
"types": [
|
"types": ["jasmine", "node"]
|
||||||
"jasmine",
|
},
|
||||||
"node"
|
"files": ["src/test.ts", "src/polyfills.ts"],
|
||||||
]
|
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/test.ts",
|
|
||||||
"src/polyfills.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
94
tslint.json
94
tslint.json
@ -1,94 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "tslint:recommended",
|
|
||||||
"rules": {
|
|
||||||
"array-type": false,
|
|
||||||
"arrow-parens": false,
|
|
||||||
"deprecation": {
|
|
||||||
"severity": "warning"
|
|
||||||
},
|
|
||||||
"component-class-suffix": true,
|
|
||||||
"contextual-lifecycle": true,
|
|
||||||
"directive-class-suffix": true,
|
|
||||||
"directive-selector": [
|
|
||||||
true,
|
|
||||||
"attribute",
|
|
||||||
"app",
|
|
||||||
"framadate",
|
|
||||||
"camelCase"
|
|
||||||
],
|
|
||||||
"component-selector": [
|
|
||||||
true,
|
|
||||||
"element",
|
|
||||||
"app",
|
|
||||||
"framadate",
|
|
||||||
"kebab-case"
|
|
||||||
],
|
|
||||||
"import-blacklist": [
|
|
||||||
true,
|
|
||||||
"rxjs/Rx"
|
|
||||||
],
|
|
||||||
"interface-name": false,
|
|
||||||
"max-classes-per-file": false,
|
|
||||||
"max-line-length": [
|
|
||||||
true,
|
|
||||||
140
|
|
||||||
],
|
|
||||||
"member-access": false,
|
|
||||||
"member-ordering": [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
"order": [
|
|
||||||
"static-field",
|
|
||||||
"instance-field",
|
|
||||||
"static-method",
|
|
||||||
"instance-method"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"no-consecutive-blank-lines": false,
|
|
||||||
"no-console": [
|
|
||||||
true,
|
|
||||||
"debug",
|
|
||||||
"info",
|
|
||||||
"time",
|
|
||||||
"timeEnd",
|
|
||||||
"trace"
|
|
||||||
],
|
|
||||||
"no-empty": false,
|
|
||||||
"no-inferrable-types": [
|
|
||||||
true,
|
|
||||||
"ignore-params"
|
|
||||||
],
|
|
||||||
"no-non-null-assertion": true,
|
|
||||||
"no-redundant-jsdoc": true,
|
|
||||||
"no-switch-case-fall-through": true,
|
|
||||||
"no-use-before-declare": true,
|
|
||||||
"no-var-requires": false,
|
|
||||||
"object-literal-key-quotes": [
|
|
||||||
true,
|
|
||||||
"as-needed"
|
|
||||||
],
|
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"ordered-imports": false,
|
|
||||||
"quotemark": [
|
|
||||||
true,
|
|
||||||
"single"
|
|
||||||
],
|
|
||||||
"trailing-comma": false,
|
|
||||||
"no-conflicting-lifecycle": true,
|
|
||||||
"no-host-metadata-property": true,
|
|
||||||
"no-input-rename": true,
|
|
||||||
"no-inputs-metadata-property": true,
|
|
||||||
"no-output-native": true,
|
|
||||||
"no-output-on-prefix": true,
|
|
||||||
"no-output-rename": true,
|
|
||||||
"no-outputs-metadata-property": true,
|
|
||||||
"template-banana-in-box": true,
|
|
||||||
"template-no-negated-async": true,
|
|
||||||
"use-lifecycle-interface": true,
|
|
||||||
"use-pipe-transform-interface": true
|
|
||||||
},
|
|
||||||
"rulesDirectory": [
|
|
||||||
"codelyzer"
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user