Skip to content

Commit

Permalink
Switch Prettier to single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
vkoves committed Jan 8, 2025
1 parent f053060 commit 046799c
Show file tree
Hide file tree
Showing 53 changed files with 1,465 additions and 1,463 deletions.
136 changes: 68 additions & 68 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ module.exports = {
es2021: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/recommended",
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/recommended',
],
parserOptions: {
parser: "@typescript-eslint/parser",
project: "./tsconfig.json",
extraFileExtensions: [".vue"],
parser: '@typescript-eslint/parser',
project: './tsconfig.json',
extraFileExtensions: ['.vue'],
},
plugins: ["vue"],
plugins: ['vue'],
rules: {
"max-len": [
"error",
'max-len': [
'error',
{
code: 100,
// Fixes errors in HTML files with long links
Expand All @@ -27,71 +27,71 @@ module.exports = {
],

// Disable stylistic rules that interfere with Prettier
"vue/html-closing-bracket-newline": "off",
"vue/html-self-closing": "off",
"vue/max-attributes-per-line": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/html-indent": "off",
'vue/html-closing-bracket-newline': 'off',
'vue/html-self-closing': 'off',
'vue/max-attributes-per-line': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/html-indent': 'off',

"vue/multi-word-component-names": ["off"],
'vue/multi-word-component-names': ['off'],
// This rule is for Vue3, and Gridsome uses Vue2
"vue/no-deprecated-filter": ["off"],
'vue/no-deprecated-filter': ['off'],
// Don't make <g-link> multiline, it adds spaces
"vue/multiline-html-element-content-newline": [
"error",
'vue/multiline-html-element-content-newline': [
'error',
{
ignores: [
"g-link",
'g-link',
// Original inline elements from: https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/utils/inline-non-void-elements.json
"a",
"abbr",
"audio",
"b",
"bdi",
"bdo",
"canvas",
"cite",
"code",
"data",
"del",
"dfn",
"em",
"i",
"iframe",
"ins",
"kbd",
"label",
"map",
"mark",
"noscript",
"object",
"output",
"picture",
"q",
"ruby",
"s",
"samp",
"small",
"span",
"strong",
"sub",
"sup",
"svg",
"time",
"u",
"var",
"video",
'a',
'abbr',
'audio',
'b',
'bdi',
'bdo',
'canvas',
'cite',
'code',
'data',
'del',
'dfn',
'em',
'i',
'iframe',
'ins',
'kbd',
'label',
'map',
'mark',
'noscript',
'object',
'output',
'picture',
'q',
'ruby',
's',
'samp',
'small',
'span',
'strong',
'sub',
'sup',
'svg',
'time',
'u',
'var',
'video',
],
},
],

"@typescript-eslint/indent": ["error", 2],
semi: ["error", "always"],
"arrow-parens": ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
'@typescript-eslint/indent': ['error', 2],
semi: ['error', 'always'],
'arrow-parens': ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],

"@typescript-eslint/explicit-function-return-type": [
"error",
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowHigherOrderFunctions: true,
Expand All @@ -101,11 +101,11 @@ module.exports = {
},
overrides: [
{
files: ["*.vue", "declarations/*.ts"],
files: ['*.vue', 'declarations/*.ts'],
rules: {
indent: "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-var-requires": 0,
indent: 'off',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/no-var-requires': 0,
},
},
],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ name: ESLint & Prettier

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
branches: ['main']

jobs:
eslint:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ name: Pytest Data Tests

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
branches: ['main']

jobs:
pytest:
name: "Pytest"
name: 'Pytest'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: '3.9'
- name: Install dependencies
run: |
cd src/data
Expand Down
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
{
"singleQuote": true
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Example:

```ts
const BuildingOwnerIds = [
"iit",
'iit',
// ...
];
```
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.8"
version: '3.8'

services:
electrify-chicago:
Expand All @@ -7,7 +7,7 @@ services:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
- '8080:8080'
entrypoint: /app/docker-entrypoint.sh
volumes:
- .:/app
Expand Down
26 changes: 13 additions & 13 deletions gridsome.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`

const path = require("path");
const path = require('path');

/**
* A function that loads in all our global SCSS files
Expand All @@ -13,45 +13,45 @@ const path = require("path");
*/
function addStyleResource(rule) {
rule
.use("style-resource")
.loader("style-resources-loader")
.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [path.resolve(__dirname, "./src/scss/*.scss")],
patterns: [path.resolve(__dirname, './src/scss/*.scss')],
});
}

module.exports = {
siteName: "Electrify Chicago",
siteName: 'Electrify Chicago',
plugins: [
{
use: "gridsome-plugin-typescript",
use: 'gridsome-plugin-typescript',
},
],

templates: {
// Register building details path
Building: [
{
path: "/building/:slugSource",
component: "./src/templates/BuildingDetails.vue",
path: '/building/:slugSource',
component: './src/templates/BuildingDetails.vue',
},
{
// A path that redirects from a building ID to the canonical slug URL
name: "building-id-redirect",
path: "/building-id/:ID",
component: "./src/templates/BuildingIDRedirect.vue",
name: 'building-id-redirect',
path: '/building-id/:ID',
component: './src/templates/BuildingIDRedirect.vue',
},
],
},

// Ensure /scss folder is globally available
chainWebpack(config) {
// Load variables for all vue-files
const types = ["vue-modules", "vue", "normal-modules", "normal"];
const types = ['vue-modules', 'vue', 'normal-modules', 'normal'];

// or if you use scss
types.forEach((type) => {
addStyleResource(config.module.rule("scss").oneOf(type));
addStyleResource(config.module.rule('scss').oneOf(type));
});
},
};
Loading

0 comments on commit 046799c

Please sign in to comment.