Skip to content

Commit

Permalink
Merge pull request #19 from simptel/feat/prettier-eslint
Browse files Browse the repository at this point in the history
added prettier, eslint config
  • Loading branch information
izahirclemencia authored Oct 9, 2023
2 parents 8e6c9e5 + aa300fd commit 300f54d
Show file tree
Hide file tree
Showing 6 changed files with 3,012 additions and 2,523 deletions.
17 changes: 14 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"plugin:import/errors",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@angular-eslint/template/process-inline-templates"
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:prettier/recommended"
],
"rules": {
"@angular-eslint/component-selector": [
Expand Down Expand Up @@ -87,10 +88,20 @@
"files": [
"*.html"
],
"excludedFiles": ["*inline-template-*.component.html"],
"extends": [
"plugin:@angular-eslint/template/recommended"
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility",
"plugin:prettier/recommended"
],
"rules": {}
"rules": {
"prettier/prettier": [
"error",
{
"parser": "angular"
}
]
}
}
]
}
42 changes: 42 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db
12 changes: 12 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"semi": true,
"bracketSpacing": true,
"arrowParens": "avoid",
"trailingComma": "es5",
"bracketSameLine": true,
"printWidth": 80,
"endOfLine": "auto"
}
5 changes: 4 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
}
},
"cli": {
"analytics": false
"analytics": false,
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@
"lint": "yarn lint:lib && yarn lint:demo",
"lint:demo": "ng lint demo",
"lint:lib": "ng lint lib",
"lint:fix": "ng lint --fix",
"lint:ci": "ng lint lib --format checkstyle > eslint.xml",
"type-check:demo": "tsc --project ./demo/tsconfig.app.json --noEmit",
"type-check:lib": "tsc --project ./lib/tsconfig.lib.json --noEmit",
"test": "ng test",
"coveralls": "cat \"./coverage/lcov.info\" | \"./node_modules/coveralls/bin/coveralls.js\"",
"gh-pages:build": "yarn build:demo --aot --base-href /ngx-markdown/",
"gh-pages:deploy": "angular-cli-ghpages --dir=\"dist/demo\" --name=\"CircleCI\" --email=\"[email protected]\" --no-silent",
"publish:lib": "npm publish ./dist/lib"
"publish:lib": "npm publish ./dist/lib",
"prettier": "npx prettier --write ."
},
"dependencies": {
"@angular/animations": "^16.0.0",
Expand All @@ -68,6 +70,7 @@
"prismjs": "^1.29.0",
"rxjs": "~6.5.3",
"tslib": "^2.3.0",
"yarn": "^1.22.19",
"zone.js": "~0.13.0"
},
"devDependencies": {
Expand All @@ -88,10 +91,12 @@
"coveralls": "^3.1.1",
"cpy-cli": "^3.1.1",
"eslint": "^8.39.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "~3.5.2",
"eslint-plugin-import": "~2.26.0",
"eslint-plugin-jsdoc": "~39.6.2",
"eslint-plugin-prefer-arrow": "~1.2.3",
"eslint-plugin-prettier": "^5.0.0",
"jasmine-core": "~4.6.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
Expand All @@ -101,8 +106,10 @@
"karma-junit-reporter": "^2.0.1",
"linklocal": "^2.8.2",
"ng-packagr": "^16.0.0",
"prettier": "^3.0.3",
"prettier-eslint": "^15.0.1",
"raw-loader": "4.0.2",
"rimraf": "^2.7.0",
"typescript": "~5.0.2"
}
}
}
Loading

0 comments on commit 300f54d

Please sign in to comment.