Merge branch 'feature/upgrade_packages_and_install_linters_auto' into 'dev'

upgrade all packages & intall & configure linters (eslint, prettier, etc.)

See merge request framasoft/framadate/funky-framadate-front!27
This commit is contained in:
ty kayn 2020-04-13 22:20:07 +02:00
commit ad5b2ff72c
13 changed files with 2599 additions and 24864 deletions

View File

@ -3,8 +3,8 @@ root = true
[*]
charset = utf-8
indent_style = tabs
indent_size = 4
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

View File

@ -1,14 +1,19 @@
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
],
parser: '@typescript-eslint/parser',
parserOptions: {
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",
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',
],
rules: {},
};

9
.prettierignore Normal file
View File

@ -0,0 +1,9 @@
package-lock.json
yarn-lock.json
yarn.lock
node_modules
build
dist
res
coverage
.vscode/*

View File

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

@ -0,0 +1,3 @@
printWidth: 120
singleQuote: true
tabWidth: 4

21402
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,82 +7,99 @@
"start": "ng serve",
"compodoc": "compodoc -p tsconfig.json",
"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",
"build:demo": "ng build --crossOrigin=anonymous --extractCss=true --progress=true --output-hashing=none --prod && 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",
"bld:pkg": "npm run build && 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",
"lint": "ng lint",
"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",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
"build-storybook": "build-storybook",
"postinstall": "ngcc"
},
"private": false,
"dependencies": {
"@angular/animations": "^9.0.0",
"@angular/cdk": "^9.0.0",
"@angular/common": "~9.0.0",
"@angular/compiler": "~9.0.0",
"@angular/core": "~9.0.0",
"@angular/forms": "~9.0.0",
"@angular/localize": "^9.0.0",
"@angular/platform-browser": "~9.0.0",
"@angular/platform-browser-dynamic": "~9.0.0",
"@angular/router": "~9.0.0",
"@fullcalendar/core": "^4.3.1",
"@angular/animations": "^9.1.1",
"@angular/cdk": "^9.2.0",
"@angular/common": "^9.0.7",
"@angular/compiler": "^9.0.7",
"@angular/core": "^9.0.7",
"@angular/forms": "^9.0.7",
"@angular/localize": "^9.1.1",
"@angular/platform-browser": "^9.0.7",
"@angular/platform-browser-dynamic": "^9.0.7",
"@angular/router": "^9.0.7",
"@fullcalendar/core": "^4.4.0",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"angular-date-value-accessor": "^0.0.2",
"angular-date-value-accessor": "^1.0.2",
"bulma": "^0.8.2",
"chart.js": "^2.8.0",
"eslint": "^6.8.0",
"font-awesome": "^4.7.0",
"husky": "^4.2.5",
"karma-coverage": "^2.0.1",
"karma-firefox-launcher": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.4",
"lint-staged": "^10.1.3",
"ngx-clipboard": "^12.3.0",
"ngx-markdown": "^8.2.2",
"ngx-clipboard": "^13.0.0",
"ngx-markdown": "^9.0.0",
"ngx-toaster": "^1.0.1",
"primeicons": "^2.0.0",
"primeng": "^9.0.0-rc.2",
"primeng": "^9.0.5",
"quill": "^1.3.7",
"rxjs": "~6.5.4",
"rxjs-compat": "^6.5.3",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
"rxjs": "^6.5.5",
"rxjs-compat": "^6.5.5",
"tslib": "^1.11.1",
"zone.js": "^0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.1",
"@angular/cli": "~9.0.1",
"@angular/compiler-cli": "^9.0.0",
"@angular/language-service": "~9.0.0",
"@babel/core": "^7.8.4",
"@storybook/addon-actions": "^5.3.13",
"@storybook/addon-links": "^5.3.13",
"@storybook/addon-notes": "^5.3.13",
"@storybook/addons": "^5.3.13",
"@storybook/angular": "^5.3.13",
"@types/jasmine": "~3.5.3",
"@angular-devkit/build-angular": "^0.901.1",
"@angular/cli": "^9.0.7",
"@angular/compiler-cli": "^9.1.1",
"@angular/language-service": "^9.0.7",
"@babel/core": "^7.9.0",
"@storybook/addon-actions": "^5.3.18",
"@storybook/addon-links": "^5.3.18",
"@storybook/addon-notes": "^5.3.18",
"@storybook/addons": "^5.3.18",
"@storybook/angular": "^5.3.18",
"@types/jasmine": "^3.5.10",
"@types/jasminewd2": "~2.0.8",
"@types/node": "^12.11.1",
"babel-loader": "^8.0.6",
"codelyzer": "^5.1.2",
"@types/node": "^13.11.1",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"babel-loader": "^8.1.0",
"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-spec-reporter": "~4.2.1",
"jasmine-spec-reporter": "~5.0.1",
"karma": "^5.0.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.1",
"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",
"ts-node": "~8.6.2",
"tslint": "^6.1.1",
"typescript": "~3.7.5"
"ts-node": "~8.8.2",
"typescript": "~3.8.3"
},
"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"
}
}

View File

@ -1,5 +1,5 @@
export const environment = {
production: true,
baseHref: "https://framadate-api.cipherbliss.com/",
baseApiHref: 'https://framadate-api.cipherbliss.com/api/v1'
baseHref: 'https://framadate-api.cipherbliss.com/',
baseApiHref: 'https://framadate-api.cipherbliss.com/api/v1',
};

View File

@ -2,23 +2,10 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": [
"node"
],
"typeRoots": [
"./node_modules/@types"
]
"types": ["node"],
"typeRoots": ["./node_modules/@types"]
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"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"]
}

View File

@ -1,6 +1,5 @@
{
"compileOnSave": false,
"node": true,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
@ -8,23 +7,17 @@
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"module": "ESNext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2018",
"types": [
"node"
],
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
"target": "es2015",
"types": ["node"],
"typeRoots": ["node_modules/@types"],
"lib": ["es2018", "dom"]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
"strictInjectionParameters": true,
"strictTemplates": true
}
}

View File

@ -2,17 +2,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine",
"node"
]
"types": ["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"]
}

View File

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

5720
yarn.lock

File diff suppressed because it is too large Load Diff