-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79bb296
commit 720926d
Showing
20 changed files
with
18,502 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
example/ | ||
.releaserc | ||
.travis.yml | ||
.nvmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"tagFormat": "${version}", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
["@semantic-release/changelog", { | ||
"changelogFile": "CHANGELOG.md" | ||
}], | ||
"@semantic-release/npm", | ||
"@semantic-release/github", | ||
["@semantic-release/git", { | ||
"assets": [ | ||
"CHANGELOG.md", | ||
"package.json", | ||
"package-lock.json" | ||
] | ||
}] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
language: node_js | ||
|
||
install: | ||
- npm ci | ||
|
||
cache: | ||
npm: true | ||
|
||
jobs: | ||
include: | ||
- stage: test | ||
script: | ||
- commitlint-travis | ||
- stage: deploy | ||
script: | ||
- npx semantic-release | ||
|
||
stages: | ||
- name: test | ||
if: type IN (push, pull_request) AND tag IS blank | ||
- name: deploy | ||
if: type IN (push) AND branch = master |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,48 @@ | ||
# eslint-shareable-web | ||
Sharable eslint config file we use on the web team | ||
# @foundersclubsoftware/eslint-shareable-web | ||
|
||
[Sharable eslint config file](https://eslint.org/docs/developer-guide/shareable-configs) we use on the web team. | ||
|
||
# Mission of this project | ||
|
||
This config file is not meant to replace the entire Vuejs eslint config file. It's meant to extend it with more functionality. On this team, we write tests with Jest, we use babel, and we use typescript. These rules are meant to add more rules to eslint to write more consistent and safe code. | ||
|
||
Vuejs is changing all the time. It would be difficult to make 1 config file that worked for all vue projects all the time. If this was a vanilla typescript nodejs app, creating a single config file would be more possible. This project's sharable config file contains mostly typescript and jest rules but can also contain other rules as well. | ||
|
||
# Getting started | ||
|
||
1. Install your dependencies: | ||
|
||
```bash | ||
npm install -D @foundersclubsoftware/eslint-shareable-web | ||
|
||
# These are modules that are required by the shareable config | ||
npm install -D @typescript-eslint/eslint-plugin @typescript-eslint/parser | ||
``` | ||
|
||
2. Enable the config by adding to your existing `.eslintrc.js` file: | ||
|
||
``` | ||
{ | ||
extends: "@foundersclubsoftware/eslint-shareable-web" | ||
} | ||
``` | ||
|
||
3. Modify your project's lint script in `package.json`. Change `"lint": "vue-cli-service lint"` to `"lint": "vue-cli-service lint --ext .ts,.js,.vue ."`. This is needed because if you do not pass in arguments to `vue-cli-service lint`, it will [automatically lint only .js and .vue files in src/ and tests/](https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-eslint/README.md#injected-commands). We want to also enable `.ts` files. | ||
|
||
# Development | ||
|
||
* Setup | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
* Use the example project located in `example/` to test out your changes to the config project. | ||
|
||
* This project follows a strict semantic versioning policy. The policy is enforced on the CI server where it will not allow you to merge your PR unless your commit messages are in the correct format. To learn more, check out [this doc](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines). | ||
|
||
* Make a PR, the team will merge it in, the a release will be made. | ||
|
||
# License | ||
|
||
See [LICENSE](LICENSE.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {extends: ['@commitlint/config-conventional']} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true | ||
}, | ||
extends: [ | ||
"plugin:vue/essential", | ||
"../index.js", | ||
"@vue/typescript/recommended", | ||
"@vue/prettier", | ||
"@vue/prettier/@typescript-eslint" | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020 | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<div id="app"> | ||
<img alt="Vue logo" src="./assets/logo.png" /> | ||
<HelloWorld msg="Welcome to Your Vue.js + TypeScript App" /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Vue } from "vue-property-decorator"; | ||
export default class App extends Vue {} | ||
const foo: any = ""; | ||
console.log(foo); | ||
</script> | ||
|
||
<style> | ||
#app { | ||
font-family: Avenir, Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
margin-top: 60px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Example project | ||
|
||
This example vuejs application is meant to be a place that you can test out your changes to the sharable eslint config file. | ||
|
||
This example project was generated using the vuejs CLI tool: | ||
|
||
![options selected](cli_config.png) | ||
|
||
Vuejs is changing all the time. This example project may need to be regenerated at some point. | ||
|
||
# Getting started | ||
|
||
``` | ||
npm install | ||
npm run lint | ||
``` | ||
|
||
You will probably see errors and warnings printed to the console. That's ok! We want that to happen because it shows that the eslint config is working. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Vue from "vue"; | ||
import App from "./App.vue"; | ||
|
||
Vue.config.productionTip = false; | ||
|
||
const foo: any = ""; | ||
console.log(foo); | ||
|
||
new Vue({ | ||
render: h => h(App) | ||
}).$mount("#app"); |
Oops, something went wrong.