Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Validating and updating circle config #3

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 32 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ jobs:
install:
working_directory: ~/angular-google-charts
docker:
- image: node:16.10
- image: node:20.13
steps:
- checkout
- restore_cache:
keys:
- node-{{ checksum "package-lock.json" }}
- run: npm install
- run: npm install --with=dev
- save_cache:
key: node-{{ checksum "package-lock.json" }}
paths:
Expand All @@ -21,12 +21,14 @@ jobs:
test:
working_directory: ~/angular-google-charts
docker:
- image: node:16.10
- image: node:20.13
steps:
- checkout
- restore_cache:
keys:
- node-{{ checksum "package-lock.json" }}
# - run: echo 'export PATH=$(npm bin):$PATH' >> $BASH_ENV
# - run: echo $PATH
- run:
name: Run tests
command: npm run test -- --ci --coverage --reporters default --reporters jest-junit
Expand All @@ -35,24 +37,25 @@ jobs:
- store_artifacts:
path: coverage

deploy:
working_directory: ~/angular-google-charts
docker:
- image: node:16.10
steps:
- checkout
- restore_cache:
keys:
- node-{{ checksum "package-lock.json" }}
- run:
name: Build
command: npm run build
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/angular-google-charts/dist/angular-google-charts/.npmrc
- run:
name: Publish to npm
command: cd dist/angular-google-charts && npm publish
# Will have to come back to this
# deploy:
# working_directory: ~/angular-google-charts
# docker:
# - image: node:16.10
# steps:
# - checkout
# - restore_cache:
# keys:
# - node-{{ checksum "package-lock.json" }}
# - run:
# name: Build
# command: npm run build
# - run:
# name: Authenticate with registry
# command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/angular-google-charts/dist/angular-google-charts/.npmrc
# - run:
# name: Publish to npm
# command: cd dist/angular-google-charts && npm publish

workflows:
test-build-deploy:
Expand All @@ -67,11 +70,11 @@ workflows:
filters:
tags:
only: /.*/
- deploy:
requires:
- test
filters:
branches:
ignore: /.*/
tags:
only: /^^v[0-9]\.[0-9]\.[0-9]$/
# - deploy:
# requires:
# - test
# filters:
# branches:
# ignore: /.*/
# tags:
# only: /^^v[0-9]\.[0-9]\.[0-9]$/
269 changes: 269 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config

It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.

We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md

Happy linting! 💖
*/
module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": [
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@angular-eslint/eslint-plugin",
"eslint-plugin-import",
"@angular-eslint/eslint-plugin-template",
"eslint-plugin-react",
"@typescript-eslint"
],
"root": true,
"rules": {
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "kebab-case"
}
],
"@angular-eslint/contextual-lifecycle": "error",
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "camelCase"
}
],
"@angular-eslint/no-host-metadata-property": "off",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-output-on-prefix": "error",
"@angular-eslint/no-output-rename": "error",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/template/banana-in-box": "error",
"@angular-eslint/template/eqeqeq": "error",
"@angular-eslint/template/no-negated-async": "error",
"@angular-eslint/use-component-view-encapsulation": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/member-delimiter-style": [
"off",
{
"multiline": {
"delimiter": "none",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
}
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true
}
],
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-shadow": [
"error",
{
"hoist": "all"
}
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/semi": [
"off",
null
],
"@typescript-eslint/unified-signatures": "off",
"arrow-body-style": "error",
"arrow-parens": [
"off",
"always"
],
"brace-style": [
"off",
"off"
],
"constructor-super": "error",
"curly": "error",
"dot-notation": "off",
"eqeqeq": [
"error",
"smart"
],
"guard-for-in": "error",
"id-denylist": "off",
"id-match": "off",
"import/no-deprecated": "warn",
"import/order": [
"error",
{
"alphabetize": {
"caseInsensitive": true,
"order": "asc"
},
"newlines-between": "always",
"groups": [
[
"builtin",
"external",
"internal",
"unknown",
"object",
"type"
],
"parent",
[
"sibling",
"index"
]
],
"distinctGroup": false,
"pathGroupsExcludedImportTypes": [],
"pathGroups": [
{
"pattern": "./",
"patternOptions": {
"nocomment": true,
"dot": true
},
"group": "sibling",
"position": "before"
},
{
"pattern": ".",
"patternOptions": {
"nocomment": true,
"dot": true
},
"group": "sibling",
"position": "before"
},
{
"pattern": "..",
"patternOptions": {
"nocomment": true,
"dot": true
},
"group": "parent",
"position": "before"
},
{
"pattern": "../",
"patternOptions": {
"nocomment": true,
"dot": true
},
"group": "parent",
"position": "before"
}
]
}
],
"max-classes-per-file": [
"error",
1
],
"no-bitwise": "error",
"no-caller": "error",
"no-debugger": "error",
"no-empty": "off",
"no-empty-function": "off",
"no-eval": "error",
"no-fallthrough": "error",
"no-irregular-whitespace": "off",
"no-new-wrappers": "error",
"no-restricted-imports": [
"error",
"rxjs/Rx"
],
"no-shadow": "off",
"no-throw-literal": "error",
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-var": "error",
"padded-blocks": [
"off",
{
"blocks": "never"
},
{
"allowSingleLineBlocks": true
}
],
"prefer-const": "error",
"radix": "error",
"react/jsx-tag-spacing": [
"off",
{
"afterOpening": "allow",
"closingSlash": "allow"
}
],
"space-in-parens": [
"off",
"never"
],
"spaced-comment": [
"error",
"always",
{
"markers": [
"/"
]
}
]
}
};
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db

# nodeenv
env/
Loading