Prettier Pass

This commit is contained in:
Sidharth Vinod
2021-05-24 00:17:20 +05:30
parent 626060cbdb
commit 77ac35acaa
6 changed files with 116 additions and 115 deletions
+29 -29
View File
@@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of # the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages. # supported CodeQL languages.
# #
name: "CodeQL" name: 'CodeQL'
on: on:
push: push:
branches: [ master ] branches: [master]
pull_request: pull_request:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: [ master ] branches: [master]
schedule: schedule:
- cron: '36 1 * * 2' - cron: '36 1 * * 2'
@@ -28,40 +28,40 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ 'javascript' ] language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more: # Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v1
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file. # By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file. # Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main # queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/autobuild@v1
# ️ Command-line programs to run using the OS shell. # ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project # and modify them (or add more) to build your code if your project
# uses a compiled language # uses a compiled language
#- run: | #- run: |
# make bootstrap # make bootstrap
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v1
+2 -2
View File
@@ -1,8 +1,8 @@
{ {
"singleQuote": true, "singleQuote": true,
"svelteSortOrder": "scripts-markup-styles", "svelteSortOrder": "options-scripts-markup-styles",
"svelteBracketNewLine": false, "svelteBracketNewLine": false,
"useTabs": true, "useTabs": true,
"trailingComma": "none", "trailingComma": "none",
"printWidth": 100 "printWidth": 100
} }
+7 -7
View File
@@ -1,8 +1,8 @@
{ {
"$schema": "https://on.cypress.io/cypress.schema.json", "$schema": "https://on.cypress.io/cypress.schema.json",
"baseUrl": "http://localhost:3000", "baseUrl": "http://localhost:3000",
"pluginsFile": "./cypress/plugins/index.cjs", "pluginsFile": "./cypress/plugins/index.cjs",
"viewportWidth": 1440, "viewportWidth": 1440,
"viewportHeight": 768, "viewportHeight": 768,
"snapshotFileName": "./cypress/snapshots.js" "snapshotFileName": "./cypress/snapshots.js"
} }
+3 -3
View File
@@ -1,5 +1,5 @@
{ {
"name": "Using fixtures to represent data", "name": "Using fixtures to represent data",
"email": "hello@cypress.io", "email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes" "body": "Fixtures are a great way to mock data for responses to routes"
} }
+63 -63
View File
@@ -1,65 +1,65 @@
{ {
"name": "mermaid-live-editor", "name": "mermaid-live-editor",
"version": "2.0.10", "version": "2.0.10",
"scripts": { "scripts": {
"dev": "svelte-kit dev", "dev": "svelte-kit dev",
"build": "svelte-kit build", "build": "svelte-kit build",
"preview": "svelte-kit preview", "preview": "svelte-kit preview",
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .", "lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
"format": "prettier --write --plugin-search-dir=. .", "format": "prettier --write --plugin-search-dir=. .",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"postinstall": "husky install" "postinstall": "husky install"
}, },
"devDependencies": { "devDependencies": {
"@cypress/snapshot": "^2.1.7", "@cypress/snapshot": "^2.1.7",
"@sveltejs/adapter-static": "^1.0.0-next.11", "@sveltejs/adapter-static": "^1.0.0-next.11",
"@sveltejs/kit": "^1.0.0-next.109", "@sveltejs/kit": "^1.0.0-next.109",
"@types/mermaid": "^8.2.5", "@types/mermaid": "^8.2.5",
"@typescript-eslint/eslint-plugin": "^4.19.0", "@typescript-eslint/eslint-plugin": "^4.19.0",
"@typescript-eslint/parser": "^4.19.0", "@typescript-eslint/parser": "^4.19.0",
"autoprefixer": "^10.2.5", "autoprefixer": "^10.2.5",
"cssnano": "^5.0.1", "cssnano": "^5.0.1",
"cypress": "^7.3.0", "cypress": "^7.3.0",
"eslint": "^7.27.0", "eslint": "^7.27.0",
"eslint-config-prettier": "^8.1.0", "eslint-config-prettier": "^8.1.0",
"eslint-plugin-cypress": "^2.11.3", "eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-jest": "^24.3.6", "eslint-plugin-jest": "^24.3.6",
"eslint-plugin-postcss-modules": "^1.2.1", "eslint-plugin-postcss-modules": "^1.2.1",
"eslint-plugin-svelte3": "^3.2.0", "eslint-plugin-svelte3": "^3.2.0",
"eslint-plugin-tailwindcss": "^1.8.0", "eslint-plugin-tailwindcss": "^1.8.0",
"husky": "^6.0.0", "husky": "^6.0.0",
"jest": "^26.6.3", "jest": "^26.6.3",
"lint-staged": "^11.0.0", "lint-staged": "^11.0.0",
"postcss": "^8.2.10", "postcss": "^8.2.10",
"postcss-load-config": "^3.0.1", "postcss-load-config": "^3.0.1",
"prettier": "~2.2.1", "prettier": "~2.2.1",
"prettier-plugin-svelte": "^2.2.0", "prettier-plugin-svelte": "^2.2.0",
"svelte": "^3.34.0", "svelte": "^3.34.0",
"svelte-preprocess": "^4.7.1", "svelte-preprocess": "^4.7.1",
"tailwindcss": "^2.1.1", "tailwindcss": "^2.1.1",
"tslib": "^2.0.0", "tslib": "^2.0.0",
"typescript": "^4.0.0" "typescript": "^4.0.0"
}, },
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@analytics/google-analytics": "^0.5.2", "@analytics/google-analytics": "^0.5.2",
"@macfja/svelte-persistent-store": "^1.1.0", "@macfja/svelte-persistent-store": "^1.1.0",
"analytics": "^0.7.5", "analytics": "^0.7.5",
"js-base64": "^3.6.1", "js-base64": "^3.6.1",
"mermaid": "^8.10.1", "mermaid": "^8.10.1",
"moment": "^2.29.1", "moment": "^2.29.1",
"monaco-editor": "^0.24.0", "monaco-editor": "^0.24.0",
"random-word-slugs": "^0.0.2" "random-word-slugs": "^0.0.2"
}, },
"lint-staged": { "lint-staged": {
"*.{ts,svelte,js,css,md}": [ "*.{ts,svelte,js,css,md}": [
"prettier --plugin-search-dir=. --write", "prettier --plugin-search-dir=. --write",
"eslint --ignore-path .gitignore " "eslint --ignore-path .gitignore "
] ]
}, },
"volta": { "volta": {
"node": "14.16.1", "node": "14.16.1",
"yarn": "1.22.10", "yarn": "1.22.10",
"npm": "7.11.2" "npm": "7.11.2"
} }
} }
+12 -11
View File
@@ -1,22 +1,23 @@
const tailwindcss = require("tailwindcss"); const tailwindcss = require('tailwindcss');
const autoprefixer = require("autoprefixer"); const autoprefixer = require('autoprefixer');
const cssnano = require("cssnano"); const cssnano = require('cssnano');
const mode = process.env.NODE_ENV; const mode = process.env.NODE_ENV;
const dev = mode === "development"; const dev = mode === 'development';
module.exports = { module.exports = {
plugins: [ plugins: [
// Some plugins, like postcss-nested, need to run before Tailwind // Some plugins, like postcss-nested, need to run before Tailwind
tailwindcss, tailwindcss,
// But others, like autoprefixer, need to run after // But others, like autoprefixer, need to run after
autoprefixer, autoprefixer,
!dev && cssnano({ !dev &&
preset: "default", cssnano({
}), preset: 'default'
], })
]
}; };