You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docker/dockerfiles.md
+12-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,15 @@
1
-
# Creating a `Dockerfile`
1
+
# About Docker
2
+
3
+
## Configuring Docker
4
+
5
+
In order to configure Docker, there are several files that will be needed, depending how you want to use Docker.
6
+
7
+
docker-compose.yml
8
+
.dockerignore
9
+
Dockerfile
10
+
devcontainer.json
11
+
12
+
## Creating a `Dockerfile`
2
13
3
14
A `Dockerfile` is a text file that contains a set of instructions for building a Docker image. It is used to automate the process of creating a Docker image by specifying the base image, adding files, installing packages, and configuring the environment
Copy file name to clipboardExpand all lines: WebDevelopment/css.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -53,11 +53,11 @@ Typical CSS files that are used to contain global styles are `index.css` and `ap
53
53
54
54
In CSS, there are special characters:
55
55
56
-
- ";" is used to separate individual declarations in a style rule.
56
+
- ";" is used to separate individual declarations in a style rule. They are required.
57
57
58
58
- "$" is not a valid character in CSS and is typically used in preprocessors like Sass for variables.
59
59
60
-
- "#" is used to denote an ID selector in CSS.
60
+
- "#" is used to denote an ID selector in CSS. It targets the id="" in the line of html tag.
61
61
62
62
- "~" is used in CSS to select sibling elements that are preceded by a specified element.
63
63
@@ -73,11 +73,11 @@ In CSS, there are special characters:
73
73
74
74
- "!" is used in CSS to denote the important flag, which gives a declaration higher priority.
75
75
76
-
- "{" and "}" are used to enclose the declarations within a style rule.
76
+
- "{" and "}" are used to enclose the declarations within a style rule. This is required.
77
77
78
78
- ":" are used for pseudo-classes, which are used to define the special state of an element. For example, ":hover" is a pseudo-class that
79
79
matches when the user designates an element (with some pointing device), but does not activate it. Another example is ":visited", which
80
-
matches links that have been visited by the user.
80
+
matches links that have been visited by the user. This is required.
81
81
82
82
- "::" are used for pseudo-elements, which are used to style specified parts of an element. For example, "::first-line" is a pseudo-element that matches the first formatted line of a paragraph.
83
83
@@ -90,6 +90,8 @@ matches links that have been visited by the user.
90
90
91
91
- "*" is used as the universal selector in CSS to select any element.
92
92
93
+
- "--" double hyphen is used in CSS variables for custom declarations of variable names inside a var().
94
+
93
95
There are various types of selectors in CSS that are used to target HTML elements for styling. Some of the key types of selectors include
94
96
95
97
- Type selectors: Select elements based on their element type (e.g., p for paragraphs, h1 for headings).
Copy file name to clipboardExpand all lines: WebDevelopment/html.md
+32-1
Original file line number
Diff line number
Diff line change
@@ -12,4 +12,35 @@ These are some of the things I have learned doing web development and creating .
12
12
13
13
Hopefully this will help you with some baseline knowledge, that may at least help you debug some issues.
14
14
15
-
First of all, we will need to
15
+
First of all, we will need to
16
+
17
+
## HTML 5 symantic tags
18
+
19
+
`<nav>`
20
+
`<aside>`
21
+
`<header>`
22
+
`<section>`
23
+
`<article>`
24
+
`<footer>`
25
+
`<main>`
26
+
27
+
## HTML 5 content elements
28
+
29
+
`<h1>` to `<h6>`: Define headings of varying levels, with `<h1>` being the most important and `<h6>` the least.Use these tags to structure your content hierarchically. For good SEO, I would not recommend using any thing more than `<h1>` to `<h3>`.
30
+
`<p>`: Represents a paragraph of text within your content.
31
+
`<pre>`: Formats preformatted text, preserving whitespace and line breaks. Often used for code snippets or poems.
32
+
`<ul>`: Defines an unordered list of items.
33
+
`<ol>`: Defines an ordered list of items, typically numbered.
34
+
`<table>`: Creates a table for presenting data in a structured format with rows and columns.
35
+
`<caption>`: Provides a caption for a table, summarizing its content.
36
+
`<figure>`: Groups an image or other visual content with an optional caption `<figcaption>` to provide context.
37
+
`<blockquote>`: Represents a long excerpt from another source, typically indented and with quotation marks.
38
+
39
+
## HTML 4 form elements
40
+
41
+
`<form>`: Defines a section of a webpage that allows users to submit data to the server.
42
+
`<label>`: Associates a label with a form element (like an input field) to explain its purpose.
43
+
`<input>`: Represents a single-line input field for various user interactions (text, password, checkbox, etc.).
44
+
`<textarea>`: Defines a multi-line text input area for users to enter larger amounts of text.
45
+
`<button>`: Creates a clickable button that can trigger actions when clicked.
46
+
`<fieldset>`: Groups related form elements visually, often with a common legend `<legend>` explaining the purpose of the group
Copy file name to clipboardExpand all lines: about-manifest-json.md
+19-19
Original file line number
Diff line number
Diff line change
@@ -33,24 +33,24 @@ At a minimum, a manifest file should contain the following manifest members: "na
33
33
34
34
An example manifest.json,
35
35
36
-
```json
37
-
{
36
+
```json
37
+
{
38
38
"name": "My Web App",
39
39
"displayName": "My Web App",
40
40
"background_color": "#ffffff",
41
41
"dir": "ltr",
42
42
"display": "standalone",
43
43
"icons": [
44
-
{
45
-
"src": "icon-192.png",
46
-
"sizes": "192x192",
47
-
"type": "image/png"
48
-
},
49
-
{
50
-
"src": "icon-512.png",
51
-
"sizes": "512x512",
52
-
"type": "image/png"
53
-
}
44
+
{
45
+
"src": "icon-192.png",
46
+
"sizes": "192x192",
47
+
"type": "image/png"
48
+
},
49
+
{
50
+
"src": "icon-512.png",
51
+
"sizes": "512x512",
52
+
"type": "image/png"
53
+
}
54
54
],
55
55
"lang": "en-US",
56
56
"orientation": "portrait",
@@ -60,19 +60,19 @@ An example manifest.json,
60
60
"manifest_version": 2,
61
61
"type": "web_app",
62
62
"meta": {
63
-
"author": "John Doe",
64
-
"description": "A simple web app",
65
-
"version": "1.0.0"
63
+
"author": "John Doe",
64
+
"description": "A simple web app",
65
+
"version": "1.0.0"
66
66
},
67
67
"dependencies": {
68
-
"react": "^17.0.2",
69
-
"react-dom": "^17.0.2"
68
+
"react": "^17.0.2",
69
+
"react-dom": "^17.0.2"
70
70
},
71
71
"defaultWidth": 800,
72
72
"defaultHeight": 600,
73
73
"resizeX": true
74
-
}
75
-
```
74
+
}
75
+
```
76
76
77
77
The manifest.json file is used in web development to define the properties and behavior of web applications and extensions. It is written in JSON (JavaScript Object Notation) format and contains various metadata and configuration settings that help browsers and platforms understand and interact with the application or extension. This file typically includes information such as the application or extension name, version number, description, icons, permissions, and background scripts
Copy file name to clipboardExpand all lines: configure-eslint.md
+40-8
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ For example, you can use a .eslintrc.js file to export an object containing your
20
20
.eslintrc.json file to define the configuration structure.
21
21
22
22
ESLint is primarily designed for linting JavaScript. However, it can also be configured to support other
23
-
languages through parser options. By default, ESLint expects ECMAScript 5 syntax, but you can override
23
+
languages through parser options. By default, ESLint expects ECMAScript 5 syntax, but you can override
24
24
this setting to enable support for other ECMAScript versions and JSX using parser options
25
25
26
26
Besides the .eslintrc file, ESLint also recognizes the following files as configuration files:
@@ -39,8 +39,8 @@ The priority order is as follows: .eslintrc.js, .eslintrc.cjs, .eslintrc.yaml, .
39
39
40
40
These files provide flexibility in how you can define and manage your ESLint configurations.
41
41
42
-
As you gain familiarity with ESLint, You should build a baseline configuration and store the rather than just
43
-
rely on the defaults so that you can get to work easily on your project and store it somewhere handy so that
42
+
As you gain familiarity with ESLint, You should build a baseline configuration and store the rather than just
43
+
rely on the defaults so that you can get to work easily on your project and store it somewhere handy so that
44
44
you can copy and paste it into your project. If you work on various types of JavaScript projects and frameworks,
45
45
you might even have several configurations you can rely on.
46
46
@@ -60,7 +60,11 @@ module.exports = {
60
60
"rules": {
61
61
"indent": ["error", 2],
62
62
"quotes": ["error", "single"],
63
-
"semi": ["error", "always"]
63
+
"semi": ["error", "always"],
64
+
},
65
+
"root":true,
66
+
"parserOptions": {
67
+
64
68
}
65
69
};
66
70
```
@@ -93,6 +97,30 @@ The docs for configuration are: [Config]<https://eslint.org/docs/latest/use/conf
93
97
94
98
"workspaces" - This configuration is used in a monorepo setup to specify the workspaces to apply the ESLint configuration to.
95
99
100
+
"ecmaFeatures" - This is an object. This specifies support for ECMAScript (JavaScript) features like jsx and classes.
101
+
102
+
"ecmaVersion" - number value: A number representing the ECMAScript version to parse the code against (e.g., 2023)
103
+
104
+
"codeFrame" - This is a boolean value, true to include code frames, false to omit them
105
+
106
+
"settings" - Provides settings for ESLint to interpret code in specific contexts.
107
+
108
+
"react" - An object or a boolean, depending on where used in the configuration, enables ESLint's built-in rules for React applications.
109
+
110
+
"version" - This is a string and an optional property that can be used to specify an ESLint shareable config version.
111
+
112
+
"jest"- An object or a boolean, depending on where used in the configuration, enables rules specific to Jest testing environments.
113
+
114
+
"browser" - A boolean value, this enables rules for code running in a browser environment
115
+
116
+
"commonjs" - A boolean value, this nables rules for code using the CommonJS module system
117
+
118
+
"amd" - Enables rules for code using the Asynchronous Module Definition (AMD) format.
119
+
120
+
"es6" - An object or boolean, Enables or configures rules for ECMAScript 6 (ES6) features.
121
+
122
+
"allowImportExportEverywhere" - This is a boolean value to allow imports and exports anywhere, false to restrict them to module top-level.
123
+
96
124
## Configurations
97
125
98
126
Common configurations in "rules" are, and they should be:
@@ -109,8 +137,8 @@ There are more configurations in "rules" that you can set. Tailor these to your
109
137
110
138
## ESLint Plugins
111
139
112
-
There are plugins for ESLint. An ESLint plugin is an npm module that can contain a set of ESLint rules, configurations,
113
-
processors, and environments. These plugins often include custom rules and can be used to enforce a style guide and support
140
+
There are plugins for ESLint. An ESLint plugin is an npm module that can contain a set of ESLint rules, configurations,
141
+
processors, and environments. These plugins often include custom rules and can be used to enforce a style guide and support
114
142
JavaScript extensions, libraries, and frameworks such as TypeScript, React, and Angular
115
143
116
144
Each plugin is an npm module with a name in the format of eslint-plugin-<plugin-name>, such as eslint-plugin-react and there
@@ -149,13 +177,17 @@ As for config.. install these packages:
149
177
If you are doing React development, I would suggest installing both the plugin and config for React. You can look up each one of these on
150
178
npmjs.com and find out what they do. I would suggest only installing eslint-plugin-prettier, eslint-plugin-react, eslint-config-react and eslint-config-prettier when you are first starting out as a beginner. You can add more. The others may not be helpful to you, but you should be aware of them.
151
179
180
+
## Ignoring files
181
+
182
+
You can tell ESLint to ignore file parsing of any file you do not want ESLint to parse by using .eslintignore which has a format similar to a .gitignore file.
183
+
It has been suggested that you should ignore parsing of node_modules.
184
+
152
185
## Disabling ESLint rules
153
186
154
187
You can inline disable ESLint's rules when necessary.
155
188
156
-
use the // eslint-disable-rulename or /*eslint-disable-rulename*/
189
+
use the // eslint-disable-rulename or /*eslint-disable-rulename*/
157
190
158
191
## ESLint in the Command Line
159
192
160
193
To run ESLint in the command line, two things can happen but most of the time all you will need to do is run `eslint --fix .` in whatever directory you are in.
0 commit comments