Skip to content

Commit

Permalink
Merge pull request #204 from zeroturnaround/sql-formatter-6
Browse files Browse the repository at this point in the history
SQL Formatter 6
  • Loading branch information
nene committed May 3, 2022
2 parents 3cd6d98 + c99e08e commit 3452374
Show file tree
Hide file tree
Showing 136 changed files with 23,341 additions and 15,138 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["@babel/preset-env"],
"presets": ["@babel/preset-env", "@babel/preset-typescript"],
"plugins": ["@babel/plugin-proposal-class-properties", "add-module-exports"]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/lib
/dist
/coverage
/vscode
webpack.*.js
53 changes: 44 additions & 9 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,54 @@
{
"parser": "babel-eslint",
"extends": ["airbnb-base", "prettier"],
"plugins": ["prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": "./tsconfig.json", "ecmaVersion": 6, "sourceType": "module" },
"extends": ["airbnb-base", "airbnb-typescript/base", "plugin:import/typescript", "prettier"],
"plugins": ["@typescript-eslint", "prettier"],
"globals": {
"document": true,
"sqlFormatter": true
},
"rules": {
"prettier/prettier": ["error"],
"class-methods-use-this": "off",
"consistent-return": "off",
"curly": ["error", "all"],
"require-unicode-regexp": ["error"],
"eqeqeq": "error",
"func-names": "error",
"no-useless-concat": "off",
"class-methods-use-this": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["test/**", "**/*.test.js", "**/*.test.ts", "vscode/src/test/**"],
"packageDir": ["./"]
}
],
"no-continue": "off",
"no-param-reassign": "off",
"prefer-template": "off",
"no-plusplus": "off",
"no-else-return": "off",
"no-use-before-define": "off"
"no-use-before-define": "off",
"no-useless-concat": "off",
"no-restricted-syntax": "off",
"prefer-template": "off",
"default-case": "off",
"prettier/prettier": ["error"],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/quotes": [
"error",
"single",
{ "avoidEscape": true, "allowTemplateLiterals": true }
],
"@typescript-eslint/semi": "error"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".ts"]
}
}
},
"env": {
"jest": true
Expand Down
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/formatting-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Formatting Bug Report
about: Raise an issue about the FORMATTING output
title: '[FORMATTING] Issue Title Here'
labels: formatting
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**Expected Output**
Please provide a code snippet of the expected SQL output.

**Actual Output**
Please provide a code snippet of the SQL output produced by the tool.

**Usage**

- How are you calling / using the script? (Please provide a code snippet, if applicable)
- What SQL language(s) does this apply to?
- What Node version? (If applicable)

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/new-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Suggest Improvement/Feature
about: Suggest new features or improvements to existing ones
title: 'Feature Request: Title Here'
labels: enhancement
assignees: ''
---

**Describe the Feature**
A clear and concise description of what the feature is.

**Why do you want this feature?**
Your reasoning behind suggesting this feature.

**Info**

- How would you be calling / using the script?
- What SQL language(s) does this apply to?
- What Node version? (If applicable)

**Additional context**
Add any other context about the feature here.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/script-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Script Bug Report
about: Raise an issue with the SCRIPT that occurred during runtime
title: '[SCRIPT] Issue Title Here'
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Usage**

- How are you calling / using the script? (Please provide a code snippet, if applicable)
- What SQL language(s) does this apply to?
- What Node version? (If applicable)

**Additional context**
Add any other context about the problem here.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/vscode-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: VSCode Bug Report
about: Raise an issue with the VSCODE Extension
title: '[VSCODE] Issue Title Here'
labels: vscode
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Usage**

- What SQL language(s) does this apply to? (Plese check the bottom right of your editor for the current VSCode language type)
- What VSCode version are you using?
- What are your currently configured VSCode settings for the `prettier-sql` extension, if relevant to the issue?

**Additional context**
Add any other context about the problem here.
32 changes: 32 additions & 0 deletions .github/workflows/coveralls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: coveralls

on:
push:
branches: [master, develop]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: yarn install --ignore-scripts

- name: Test
run: yarn test --coverage

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/webpack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: webpack

on:
pull_request:
branches: [master, develop]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: yarn install --ignore-scripts

- name: Test
run: yarn test

- name: Build
run: yarn build
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
/dist
/lib
/node_modules
yarn.lock
LICENSE
9 changes: 8 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"printWidth": 100,
"singleQuote": true
"singleQuote": true,
"arrowParens": "avoid",
"semi": true,
"bracketSpacing": true,
"useTabs": false,
"tabWidth": 2,
"endOfLine": "lf",
"quoteProps": "consistent"
}
36 changes: 36 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"hooks": {},
"git": {
"changelog": "git log --pretty=format:\"* %s (%h)\" ${latestTag}...HEAD",
"requireCleanWorkingDir": true,
"requireBranch": "master",
"requireUpstream": true,
"requireCommits": false,
"addUntrackedFiles": false,
"commit": true,
"commitMessage": "Release v${version}",
"tag": true,
"tagAnnotation": "${version}",
"push": true,
"pushArgs": ["--follow-tags"]
},
"npm": {
"publish": true,
"publishPath": ".",
"publishArgs": [],
"tag": null,
"otp": null,
"ignoreVersion": true,
"skipChecks": false,
"timeout": 10
},
"github": {
"release": true,
"releaseName": "${version}",
"releaseNotes": "git log --pretty=format:\"* %s (%h)\" ${latestTag}...HEAD",
"preRelease": false,
"draft": false,
"skipChecks": false,
"web": true
}
}
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 3452374

Please sign in to comment.