Skip to content

Commit 95d38ac

Browse files
committed
remove all references to the .es6 in our config files and documentation
1 parent 68e40bd commit 95d38ac

File tree

9 files changed

+14
-16
lines changed

9 files changed

+14
-16
lines changed

.gitattributes

-1
This file was deleted.

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ lint:javascript:report:
368368
stage: post-test
369369
before_script: []
370370
script:
371-
- find app/ spec/ -name '*.js' -or -name '*.js.es6' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files
371+
- find app/ spec/ -name '*.js' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files
372372
- yarn run eslint-report || true # ignore exit code
373373
artifacts:
374374
name: eslint-report

config/karma.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = function(config) {
3636
{ pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw)', included: false },
3737
],
3838
preprocessors: {
39-
'spec/javascripts/**/*.js?(.es6)': ['webpack', 'sourcemap'],
39+
'spec/javascripts/**/*.js': ['webpack', 'sourcemap'],
4040
},
4141
reporters: [progressReporter, 'coverage-istanbul'],
4242
coverageIstanbulReporter: {

config/webpack.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var config = {
5656
module: {
5757
rules: [
5858
{
59-
test: /\.(js|es6)$/,
59+
test: /\.js$/,
6060
exclude: /(node_modules|vendor\/assets)/,
6161
loader: 'babel-loader',
6262
options: {
@@ -130,7 +130,7 @@ var config = {
130130
],
131131

132132
resolve: {
133-
extensions: ['.js', '.es6', '.js.es6'],
133+
extensions: ['.js'],
134134
alias: {
135135
'~': path.join(ROOT_PATH, 'app/assets/javascripts'),
136136
'emojis': path.join(ROOT_PATH, 'fixtures/emojis'),

doc/development/testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ GitLab uses [Karma] to run its [Jasmine] JavaScript specs. They can be run on
3535
the command line via `bundle exec karma`.
3636

3737
- JavaScript tests live in `spec/javascripts/`, matching the folder structure of
38-
`app/assets/javascripts/`: `app/assets/javascripts/behaviors/autosize.js.es6` has a corresponding
39-
`spec/javascripts/behaviors/autosize_spec.js.es6` file.
38+
`app/assets/javascripts/`: `app/assets/javascripts/behaviors/autosize.js` has a corresponding
39+
`spec/javascripts/behaviors/autosize_spec.js` file.
4040
- Haml fixtures required for JavaScript tests live in
4141
`spec/javascripts/fixtures`. They should contain the bare minimum amount of
4242
markup necessary for the test.

lib/banzai/pipeline/gfm_pipeline.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ module Banzai
22
module Pipeline
33
class GfmPipeline < BasePipeline
44
# These filters convert GitLab Flavored Markdown (GFM) to HTML.
5-
# The handlers defined in app/assets/javascripts/copy_as_gfm.js.es6
5+
# The handlers defined in app/assets/javascripts/copy_as_gfm.js
66
# consequently convert that same HTML to GFM to be copied to the clipboard.
77
# Every filter that generates HTML from GFM should have a handler in
8-
# app/assets/javascripts/copy_as_gfm.js.es6, in reverse order.
8+
# app/assets/javascripts/copy_as_gfm.js, in reverse order.
99
# The GFM-to-HTML-to-GFM cycle is tested in spec/features/copy_as_gfm_spec.rb.
1010
def self.filters
1111
@filters ||= FilterArray[

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"private": true,
33
"scripts": {
44
"dev-server": "webpack-dev-server --config config/webpack.config.js",
5-
"eslint": "eslint --max-warnings 0 --ext .js,.js.es6 .",
6-
"eslint-fix": "eslint --max-warnings 0 --ext .js,.js.es6 --fix .",
7-
"eslint-report": "eslint --max-warnings 0 --ext .js,.js.es6 --format html --output-file ./eslint-report.html .",
5+
"eslint": "eslint --max-warnings 0 --ext .js .",
6+
"eslint-fix": "eslint --max-warnings 0 --ext .js --fix .",
7+
"eslint-report": "eslint --max-warnings 0 --ext .js --format html --output-file ./eslint-report.html .",
88
"karma": "karma start config/karma.config.js --single-run",
99
"karma-start": "karma start config/karma.config.js",
1010
"webpack": "webpack --config config/webpack.config.js",
@@ -62,7 +62,6 @@
6262
"exclude": [
6363
"spec/javascripts/test_bundle.js",
6464
"spec/javascripts/**/*_spec.js",
65-
"spec/javascripts/**/*_spec.js.es6",
6665
"app/assets/javascripts/droplab/**/*"
6766
]
6867
}

spec/features/copy_as_gfm_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
end
2121

2222
# The filters referenced in lib/banzai/pipeline/gfm_pipeline.rb convert GitLab Flavored Markdown (GFM) to HTML.
23-
# The handlers defined in app/assets/javascripts/copy_as_gfm.js.es6 consequently convert that same HTML to GFM.
23+
# The handlers defined in app/assets/javascripts/copy_as_gfm.js consequently convert that same HTML to GFM.
2424
# To make sure these filters and handlers are properly aligned, this spec tests the GFM-to-HTML-to-GFM cycle
2525
# by verifying (`html_to_gfm(gfm_to_html(gfm)) == gfm`) for a number of examples of GFM for every filter, using the `verify` helper.
2626

spec/javascripts/test_bundle.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ describe('Uncovered files', function () {
4848
'./network/branch_graph.js',
4949
];
5050

51-
const sourceFiles = require.context('~', true, /^\.\/(?!application\.js).*\.(js|es6)$/);
51+
const sourceFiles = require.context('~', true, /^\.\/(?!application\.js).*\.js$/);
5252
sourceFiles.keys().forEach(function (path) {
5353
// ignore if there is a matching spec file
54-
if (testsContext.keys().indexOf(`${path.replace(/\.js(\.es6)?$/, '')}_spec`) > -1) {
54+
if (testsContext.keys().indexOf(`${path.replace(/\.js$/, '')}_spec`) > -1) {
5555
return;
5656
}
5757

0 commit comments

Comments
 (0)